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:
parent
e85082d2f1
commit
429c896e33
@ -28,11 +28,14 @@ void cCreeper::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
|
|||||||
super::Tick(a_Dt, a_Chunk);
|
super::Tick(a_Dt, a_Chunk);
|
||||||
|
|
||||||
if (!TargetIsInRange() && !m_BurnedWithFlintAndSteel)
|
if (!TargetIsInRange() && !m_BurnedWithFlintAndSteel)
|
||||||
|
{
|
||||||
|
if (m_bIsBlowing)
|
||||||
{
|
{
|
||||||
m_ExplodingTimer = 0;
|
m_ExplodingTimer = 0;
|
||||||
m_bIsBlowing = false;
|
m_bIsBlowing = false;
|
||||||
m_World->BroadcastEntityMetadata(*this);
|
m_World->BroadcastEntityMetadata(*this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_bIsBlowing)
|
if (m_bIsBlowing)
|
||||||
|
Loading…
Reference in New Issue
Block a user