mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Remove redundant on_dieplayer calls
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user