Prevent suffocation in plantlike
nodes
This commit is contained in:
parent
9c5c0dcd3c
commit
73680423f5
@ -177,7 +177,7 @@ void PlayerSAO::step(float dtime, bool send_recommended)
|
|||||||
const ContentFeatures &c = m_env->getGameDef()->ndef()->get(n);
|
const ContentFeatures &c = m_env->getGameDef()->ndef()->get(n);
|
||||||
// If node generates drown
|
// If node generates drown
|
||||||
const bool noclip = m_privs.count("noclip") && (!m_is_singleplayer || 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 && 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 (drowning > 0 && m_hp > 0 && !noclip) {
|
||||||
if (m_breath > 0)
|
if (m_breath > 0)
|
||||||
setBreath(m_breath - 1);
|
setBreath(m_breath - 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user