Fix drowning in minetest_game doors (#66)

Fixes #65
master
luk3yx 2022-07-03 07:32:53 +12:00 committed by GitHub
parent d4f6bf31c2
commit f09359eb58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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) ? 1 : c.drowning;
int drowning = (c.walkable && c.drawtype != NDT_NODEBOX && c.drawtype != NDT_AIRLIKE) ? 1 : c.drowning;
if (drowning > 0 && m_hp > 0 && !noclip) {
if (m_breath > 0)
setBreath(m_breath - 1);