mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Fix multiple death messages (#5305)
Fix multiple death messages (#3565) and damage server logs after death.
This commit is contained in:
parent
63e175dd70
commit
351cc2e79a
3 changed files with 14 additions and 8 deletions
|
@ -919,8 +919,8 @@ void PlayerSAO::step(float dtime, bool send_recommended)
|
|||
MapNode n = m_env->getMap().getNodeNoEx(p);
|
||||
const ContentFeatures &c = m_env->getGameDef()->ndef()->get(n);
|
||||
// If node generates drown
|
||||
if (c.drowning > 0) {
|
||||
if (m_hp > 0 && m_breath > 0)
|
||||
if (c.drowning > 0 && m_hp > 0) {
|
||||
if (m_breath > 0)
|
||||
setBreath(m_breath - 1);
|
||||
|
||||
// No more breath, damage player
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue