1
0

Only send creeper updates when there is a change

Otherwise this keeps spamming the metadata packet for all the creepers on the server.
This commit is contained in:
Gargaj 2015-11-07 21:57:32 +01:00
parent e85082d2f1
commit 429c896e33

View File

@ -29,9 +29,12 @@ void cCreeper::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
if (!TargetIsInRange() && !m_BurnedWithFlintAndSteel)
{
m_ExplodingTimer = 0;
m_bIsBlowing = false;
m_World->BroadcastEntityMetadata(*this);
if (m_bIsBlowing)
{
m_ExplodingTimer = 0;
m_bIsBlowing = false;
m_World->BroadcastEntityMetadata(*this);
}
}
else
{