diff options
Diffstat (limited to '')
-rw-r--r-- | src/Entities/EnderCrystal.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Entities/EnderCrystal.cpp b/src/Entities/EnderCrystal.cpp index 4c21a794d..defa396f5 100644 --- a/src/Entities/EnderCrystal.cpp +++ b/src/Entities/EnderCrystal.cpp @@ -89,13 +89,14 @@ void cEnderCrystal::KilledBy(TakeDamageInfo & a_TDI) { Super::KilledBy(a_TDI); - m_World->DoExplosionAt(6.0, GetPosX(), GetPosY() + (GetHeight() / 2.0), GetPosZ(), true, esEnderCrystal, this); - + // Destroy first so the Explodinator doesn't find us (when iterating through entities): Destroy(); - m_World->SetBlock(POS_TOINT, E_BLOCK_FIRE, 0); -} - - - + m_World->DoExplosionAt(6.0, GetPosX(), GetPosY() + (GetHeight() / 2.0), GetPosZ(), true, esEnderCrystal, this); + const auto Position = GetPosition().Floor(); + if (cChunkDef::IsValidHeight(Position.y)) + { + m_World->SetBlock(Position, E_BLOCK_FIRE, 0); + } +} |