summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Creeper.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-12-09 07:47:06 +0100
committerMattes D <github@xoft.cz>2015-12-09 07:47:06 +0100
commitac8504a6ef8470477298eea8a396df4f075fe2a9 (patch)
tree37e8365c3efdca71aa9ba0ae1ebd50bf2503292a /src/Mobs/Creeper.cpp
parentSmall spelling issues fixed (diff)
parentstop creepers from exploding even if they just died (diff)
downloadcuberite-ac8504a6ef8470477298eea8a396df4f075fe2a9.tar
cuberite-ac8504a6ef8470477298eea8a396df4f075fe2a9.tar.gz
cuberite-ac8504a6ef8470477298eea8a396df4f075fe2a9.tar.bz2
cuberite-ac8504a6ef8470477298eea8a396df4f075fe2a9.tar.lz
cuberite-ac8504a6ef8470477298eea8a396df4f075fe2a9.tar.xz
cuberite-ac8504a6ef8470477298eea8a396df4f075fe2a9.tar.zst
cuberite-ac8504a6ef8470477298eea8a396df4f075fe2a9.zip
Diffstat (limited to 'src/Mobs/Creeper.cpp')
-rw-r--r--src/Mobs/Creeper.cpp2
1 files changed, 1 insertions, 1 deletions
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