From 2838bf185d26cc792dcad9c3c778c00888b27a96 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 10 Feb 2019 18:37:44 +0100 Subject: [PATCH] Don't regain breath while in ignore node Fixes #8217 --- src/content_sao.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content_sao.cpp b/src/content_sao.cpp index ecacd74529268..adcc4170119eb 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -1015,9 +1015,11 @@ void PlayerSAO::step(float dtime, bool send_recommended) // Get nose/mouth position, approximate with eye position v3s16 p = floatToInt(getEyePosition(), BS); MapNode n = m_env->getMap().getNodeNoEx(p); + content_t content = n.getContent(); const ContentFeatures &c = m_env->getGameDef()->ndef()->get(n); - // If player is alive & no drowning, breathe - if (m_hp > 0 && m_breath < m_prop.breath_max && c.drowning == 0) + // If player is alive & no drowning & not in ignore, breathe + if (content != CONTENT_IGNORE && m_hp > 0 && + m_breath < m_prop.breath_max && c.drowning == 0) setBreath(m_breath + 1); }