mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix LocalPlayer::isDead always returning false if player is immortal
This commit is contained in:
parent
81c7f0ae04
commit
e2d6445f2a
2 changed files with 6 additions and 1 deletions
|
@ -732,6 +732,11 @@ v3f LocalPlayer::getEyeOffset() const
|
|||
return v3f(0, BS * eye_height, 0);
|
||||
}
|
||||
|
||||
bool LocalPlayer::isDead() const
|
||||
{
|
||||
return !getCAO()->isImmortal() && hp == 0;
|
||||
}
|
||||
|
||||
// 3D acceleration
|
||||
void LocalPlayer::accelerate(const v3f &target_speed, const f32 max_increase_H,
|
||||
const f32 max_increase_V, const bool use_pitch)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue