aboutsummaryrefslogtreecommitdiff
path: root/src/client/localplayer.h
diff options
context:
space:
mode:
authorANAND <ClobberXD@gmail.com>2019-05-04 12:43:31 +0530
committerSmallJoker <mk939@ymail.com>2019-08-20 18:48:28 +0200
commit3c395d908f016158162f022f24d7ea48eeb7e8d5 (patch)
tree1fb25622374b7cf4cb0252cadf2dca08928cee42 /src/client/localplayer.h
parentded5da780002c17f2079a1d8ea09eb923a3b5e8f (diff)
downloaddragonfireclient-3c395d908f016158162f022f24d7ea48eeb7e8d5.tar.xz
Disable autoforward if player is dead
Diffstat (limited to 'src/client/localplayer.h')
-rw-r--r--src/client/localplayer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/localplayer.h b/src/client/localplayer.h
index 16e7996ae..252519aaa 100644
--- a/src/client/localplayer.h
+++ b/src/client/localplayer.h
@@ -100,7 +100,7 @@ public:
bool makes_footstep_sound = true;
int last_animation = NO_ANIM;
- float last_animation_speed;
+ float last_animation_speed = 0.0f;
std::string hotbar_image = "";
std::string hotbar_selected_image = "";
@@ -149,6 +149,8 @@ public:
bool getAutojump() const { return m_autojump; }
+ bool isDead() const { return hp <= 0; }
+
inline void addVelocity(const v3f &vel)
{
added_velocity += vel;