1
0

Broadcaster: don't loop over all entities to broadcast one's position

* Use ForClientsWithEntity
This commit is contained in:
Tiger Wang 2020-08-28 21:41:18 +01:00
parent be121f9e80
commit 8fa8ee96fc

View File

@ -316,7 +316,7 @@ void cWorld::BroadcastEntityMetadata(const cEntity & a_Entity, const cClientHand
void cWorld::BroadcastEntityPosition(const cEntity & a_Entity, const cClientHandle * a_Exclude)
{
ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
ForClientsWithEntity(a_Entity, *this, a_Exclude, [&](cClientHandle & a_Client)
{
a_Client.SendEntityPosition(a_Entity);
}