We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f64986 commit 0eab70aCopy full SHA for 0eab70a
pkg/demoinfocs/common/player.go
@@ -65,9 +65,13 @@ func (p *Player) SteamID32() uint32 {
65
66
// IsAlive returns true if the player is alive.
67
func (p *Player) IsAlive() bool {
68
- s1LifeState := p.Entity.Property("m_lifeState")
+ s2IsAlive := p.Entity.Property("m_bPawnIsAlive")
69
70
- return p.Health() > 0 || (s1LifeState != nil && s1LifeState.Value().Int() == 0)
+ if s2IsAlive != nil {
71
+ return s2IsAlive.Value().BoolVal()
72
+ }
73
+
74
+ return p.Health() > 0 || getInt(p.Entity, "m_lifeState") == 0
75
}
76
77
// IsBlinded returns true if the player is currently flashed.
0 commit comments