mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-24 05:37:17 +00:00
[Performance] Re-use ClientUpdate packet memory (#4619)
This commit is contained in:
1 parent
6525051d2d
commit
07c762068f
4 files changed
+24
-28
No files matched your search
+3
-4
@@ -3824,13 +3824,12 @@ int NPC::GetRolledItemCount(uint32 item_id)
|
||||
|
||||
void NPC::SendPositionToClients()
|
||||
{
|
||||
auto p = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
|
||||
auto *s = (PlayerPositionUpdateServer_Struct *) p->pBuffer;
|
||||
static EQApplicationPacket p(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
|
||||
auto *s = (PlayerPositionUpdateServer_Struct *) p.pBuffer;
|
||||
for (auto &c: entity_list.GetClientList()) {
|
||||
MakeSpawnUpdate(s);
|
||||
c.second->QueuePacket(p, false);
|
||||
c.second->QueuePacket(&p, false);
|
||||
}
|
||||
safe_delete(p);
|
||||
}
|
||||
|
||||
void NPC::HandleRoambox()
|
||||
|
||||
Reference in new issue
Block a user