aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/player_sao.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/player_sao.cpp b/src/server/player_sao.cpp
index 0d31f2e0b..d4d036726 100644
--- a/src/server/player_sao.cpp
+++ b/src/server/player_sao.cpp
@@ -167,7 +167,6 @@ void PlayerSAO::step(float dtime, bool send_recommended)
if (m_breath == 0) {
PlayerHPChangeReason reason(PlayerHPChangeReason::DROWNING);
setHP(m_hp - c.drowning, reason);
- m_env->getGameDef()->SendPlayerHPOrDie(this, reason);
}
}
}
@@ -216,7 +215,6 @@ void PlayerSAO::step(float dtime, bool send_recommended)
s32 newhp = (s32)m_hp - (s32)damage_per_second;
PlayerHPChangeReason reason(PlayerHPChangeReason::NODE_DAMAGE, nodename);
setHP(newhp, reason);
- m_env->getGameDef()->SendPlayerHPOrDie(this, reason);
}
}
@@ -491,6 +489,8 @@ void PlayerSAO::setHP(s32 hp, const PlayerHPChangeReason &reason)
// Update properties on death
if ((hp == 0) != (oldhp == 0))
m_properties_sent = false;
+
+ m_env->getGameDef()->SendPlayerHPOrDie(this, reason);
}
void PlayerSAO::setBreath(const u16 breath, bool send)