1
0

Merge pull request #2706 from Gargaj/deadcreeper

Stop creepers from exploding even if they just died
This commit is contained in:
Mattes D 2015-12-09 07:47:06 +01:00
commit ac8504a6ef

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