1
0

stop creepers from exploding even if they just died

This commit is contained in:
Gargaj 2015-12-01 23:16:49 +01:00
parent d75ab544f4
commit 86ea2ee50c

View File

@ -43,7 +43,7 @@ void cCreeper::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
m_ExplodingTimer += 1;
}
if (m_ExplodingTimer == 30)
if ((m_ExplodingTimer == 30) && (GetHealth() > 0.0)) // only explode when not already dead
{
m_World->DoExplosionAt((m_bIsCharged ? 5 : 3), GetPosX(), GetPosY(), GetPosZ(), false, esMonster, this);
Destroy(); // Just in case we aren't killed by the explosion