forked from Mirrorlandia_minetest/minetest
Fix LocalPlayer::isDead always returning false if player is immortal
This commit is contained in:
parent
81c7f0ae04
commit
e2d6445f2a
@ -732,6 +732,11 @@ v3f LocalPlayer::getEyeOffset() const
|
|||||||
return v3f(0, BS * eye_height, 0);
|
return v3f(0, BS * eye_height, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LocalPlayer::isDead() const
|
||||||
|
{
|
||||||
|
return !getCAO()->isImmortal() && hp == 0;
|
||||||
|
}
|
||||||
|
|
||||||
// 3D acceleration
|
// 3D acceleration
|
||||||
void LocalPlayer::accelerate(const v3f &target_speed, const f32 max_increase_H,
|
void LocalPlayer::accelerate(const v3f &target_speed, const f32 max_increase_H,
|
||||||
const f32 max_increase_V, const bool use_pitch)
|
const f32 max_increase_V, const bool use_pitch)
|
||||||
|
@ -149,7 +149,7 @@ public:
|
|||||||
|
|
||||||
bool getAutojump() const { return m_autojump; }
|
bool getAutojump() const { return m_autojump; }
|
||||||
|
|
||||||
bool isDead() const { return hp <= 0; }
|
bool isDead() const;
|
||||||
|
|
||||||
inline void addVelocity(const v3f &vel)
|
inline void addVelocity(const v3f &vel)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user