Merge pull request #2706 from Gargaj/deadcreeper
Stop creepers from exploding even if they just died
This commit is contained in:
commit
ac8504a6ef
@ -43,7 +43,7 @@ void cCreeper::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
|
|||||||
m_ExplodingTimer += 1;
|
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);
|
m_World->DoExplosionAt((m_bIsCharged ? 5 : 3), GetPosX(), GetPosY(), GetPosZ(), false, esMonster, this);
|
||||||
Destroy(); // Just in case we aren't killed by the explosion
|
Destroy(); // Just in case we aren't killed by the explosion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user