aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorpresstabstart <presstabstart@users.noreply.github.com>2017-04-07 04:32:50 +0100
committerAuke Kok <sofar+github@foo-projects.org>2017-04-06 20:32:50 -0700
commit351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19 (patch)
treec0f1bedcd3ebfaf1d80ebf11fee78ecb85bdd2be /src/content_sao.cpp
parent63e175dd70898e2ae714a025d1eaee45a453d41c (diff)
downloadminetest-351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19.tar.gz
minetest-351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19.tar.bz2
minetest-351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19.zip
Fix multiple death messages (#5305)
Fix multiple death messages (#3565) and damage server logs after death.
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp4
1 files changed, 2 insertions, 2 deletions
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