1
0

Players in creative and spectator aren't affected by cacti (#3824)

This commit is contained in:
Bond-009 2017-07-02 07:39:19 +02:00 committed by Lukas Pioch
parent 445abe001a
commit cf22bc4e60

View File

@ -911,7 +911,10 @@ void cEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
m_TicksSinceLastVoidDamage = 0;
}
if (IsMob() || IsPlayer() || IsPickup() || IsExpOrb())
if (
IsMob() || IsPickup() || IsExpOrb() ||
(IsPlayer() && !((reinterpret_cast<cPlayer *>(this))->IsGameModeCreative() || (reinterpret_cast<cPlayer *>(this))->IsGameModeSpectator()))
)
{
DetectCacti();
}