Broadcaster: don't loop over all entities to broadcast one's position
* Use ForClientsWithEntity
This commit is contained in:
parent
be121f9e80
commit
8fa8ee96fc
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user