From 73680423f5994e73fdb2e49289309fcf41c6ccfb Mon Sep 17 00:00:00 2001 From: luk3yx Date: Mon, 31 Jul 2023 04:57:03 +1200 Subject: [PATCH] Prevent suffocation in `plantlike` nodes --- src/server/player_sao.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/player_sao.cpp b/src/server/player_sao.cpp index fdaa2d45b..bcbdaa891 100644 --- a/src/server/player_sao.cpp +++ b/src/server/player_sao.cpp @@ -177,7 +177,7 @@ void PlayerSAO::step(float dtime, bool send_recommended) const ContentFeatures &c = m_env->getGameDef()->ndef()->get(n); // If node generates drown const bool noclip = m_privs.count("noclip") && (!m_is_singleplayer || g_settings->getBool("noclip")); - int drowning = (c.walkable && c.drawtype != NDT_NODEBOX && c.drawtype != NDT_AIRLIKE) ? 1 : c.drowning; + int drowning = (c.walkable && c.drawtype != NDT_NODEBOX && c.drawtype != NDT_AIRLIKE && c.drawtype != NDT_PLANTLIKE) ? 1 : c.drowning; if (drowning > 0 && m_hp > 0 && !noclip) { if (m_breath > 0) setBreath(m_breath - 1);