Closed dronelektron closed 1 year ago
Player.dead returns True when Player.life_state(m_lifeState) is not 0(LIFE_ALIVE), but CBasePlayer::IsDead() and CPlayerInfo::IsDead() return True only when m_lifeState is 2(LIFE_DEAD).
In the above code, PlayerInfo.is_dead returns False because Player.life_state is 1(LIFE_DYING), meaning that the player is not yet completely dead. It should return True when the death animation is finished.
Oh, thanks for the explanation, I tested it and it works just like you said
Given the following code:
Case 1 (Bug?):
Case 2 (OK):