stop creepers from exploding even if they just died
This commit is contained in:
parent
d75ab544f4
commit
86ea2ee50c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user