diff options
author | savilli <78875209+savilli@users.noreply.github.com> | 2021-08-28 12:14:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-28 12:14:16 +0200 |
commit | 3f1adb49ae8da5bb02bea52609524d3645b6a665 (patch) | |
tree | 43bebf8149ef9f83a1d3c79579e7ba6453e414ab /src/server | |
parent | 1d69a23ba48d99b051dcf2a6be225edd7c644c7b (diff) | |
download | minetest-3f1adb49ae8da5bb02bea52609524d3645b6a665.tar.gz minetest-3f1adb49ae8da5bb02bea52609524d3645b6a665.tar.bz2 minetest-3f1adb49ae8da5bb02bea52609524d3645b6a665.zip |
Remove redundant on_dieplayer calls
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/player_sao.cpp | 4 |
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) |