From b23c5b02ba66a463d5fdd69fbc4f52718294df42 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Fri, 13 May 2022 10:58:54 +1200 Subject: [PATCH] Fix noclip check on servers --- 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 7e2f13e26..1d78bbc3f 100644 --- a/src/server/player_sao.cpp +++ b/src/server/player_sao.cpp @@ -176,7 +176,7 @@ void PlayerSAO::step(float dtime, bool send_recommended) MapNode n = m_env->getMap().getNode(p); const ContentFeatures &c = m_env->getGameDef()->ndef()->get(n); // If node generates drown - bool noclip = m_privs.count("noclip") && g_settings->getBool("noclip"); + const bool noclip = m_privs.count("noclip") && (!m_is_singleplayer || g_settings->getBool("noclip")); int drowning = (c.walkable && c.drawtype != NDT_NODEBOX) ? 1 : c.drowning; if (drowning > 0 && m_hp > 0 && !noclip) { if (m_breath > 0)