From 86ea2ee50c7c3d118e25d0fac0100c5c8f04a78a Mon Sep 17 00:00:00 2001 From: Gargaj Date: Tue, 1 Dec 2015 23:16:49 +0100 Subject: stop creepers from exploding even if they just died --- src/Mobs/Creeper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Mobs/Creeper.cpp') diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp index 141f77d08..b909ab952 100644 --- a/src/Mobs/Creeper.cpp +++ b/src/Mobs/Creeper.cpp @@ -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 -- cgit v1.2.3