diff options
Diffstat (limited to 'src/server/player_sao.cpp')
-rw-r--r-- | src/server/player_sao.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/player_sao.cpp b/src/server/player_sao.cpp index d4d036726..690823bb7 100644 --- a/src/server/player_sao.cpp +++ b/src/server/player_sao.cpp @@ -462,7 +462,7 @@ void PlayerSAO::rightClick(ServerActiveObject *clicker) m_env->getScriptIface()->on_rightclickplayer(this, clicker); } -void PlayerSAO::setHP(s32 hp, const PlayerHPChangeReason &reason) +void PlayerSAO::setHP(s32 hp, const PlayerHPChangeReason &reason, bool send) { if (hp == (s32)m_hp) return; // Nothing to do @@ -490,7 +490,8 @@ void PlayerSAO::setHP(s32 hp, const PlayerHPChangeReason &reason) if ((hp == 0) != (oldhp == 0)) m_properties_sent = false; - m_env->getGameDef()->SendPlayerHPOrDie(this, reason); + if (send) + m_env->getGameDef()->SendPlayerHPOrDie(this, reason); } void PlayerSAO::setBreath(const u16 breath, bool send) |