Make creeper stop when about to explode

Closed #5485
This commit is contained in:
ChillerDragon 2023-06-09 19:22:16 +02:00
parent 4fe144de35
commit fa6cb4499d

View File

@ -32,6 +32,16 @@ void cCreeper::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
return;
}
// stop walking when about to blow
if (m_bIsBlowing)
{
m_EMState = ATTACKING;
}
else if (m_EMState == ATTACKING)
{
m_EMState = IDLE;
}
if (((GetTarget() == nullptr) || !TargetIsInRange()) && !m_BurnedWithFlintAndSteel)
{
if (m_bIsBlowing)