From 351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19 Mon Sep 17 00:00:00 2001 From: presstabstart Date: Fri, 7 Apr 2017 04:32:50 +0100 Subject: Fix multiple death messages (#5305) Fix multiple death messages (#3565) and damage server logs after death. --- src/content_sao.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/content_sao.cpp') diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 69f80d356..ea2a4ebf6 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -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 -- cgit v1.2.3