Skip to content

Commit 924474a

Browse files
BestAwperEverakiver
authored andcommitted
check pawn entity health
1 parent 4d9f95a commit 924474a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/demoinfocs/common/player.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ func (p *Player) ControlledBot() *Player {
354354
// Health returns the player's health points, normally 0-100.
355355
func (p *Player) Health() int {
356356
if p.demoInfoProvider.IsSource2() {
357-
return int(getUInt64(p.Entity, "m_iPawnHealth"))
357+
return int(getInt(p.PlayerPawnEntity(), "m_iHealth"))
358358
}
359359

360360
return getInt(p.Entity, "m_iHealth")

0 commit comments

Comments
 (0)