mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-25 23:17:16 +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
@@ -824,8 +824,8 @@ void MobMovementManager::SendCommandToClients(
|
||||
return;
|
||||
}
|
||||
|
||||
EQApplicationPacket outapp(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
|
||||
auto *spu = (PlayerPositionUpdateServer_Struct *) outapp.pBuffer;
|
||||
static EQApplicationPacket p(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
|
||||
auto *spu = (PlayerPositionUpdateServer_Struct *) p.pBuffer;
|
||||
|
||||
FillCommandStruct(spu, mob, delta_x, delta_y, delta_z, delta_heading, anim);
|
||||
|
||||
@@ -862,7 +862,7 @@ void MobMovementManager::SendCommandToClients(
|
||||
}
|
||||
}
|
||||
|
||||
c->QueuePacket(&outapp, false);
|
||||
c->QueuePacket(&p, false);
|
||||
c->m_last_seen_mob_position[mob->GetID()] = mob->GetPosition();
|
||||
}
|
||||
}
|
||||
@@ -924,7 +924,7 @@ void MobMovementManager::SendCommandToClients(
|
||||
}
|
||||
}
|
||||
|
||||
c->QueuePacket(&outapp, false);
|
||||
c->QueuePacket(&p, false);
|
||||
c->m_last_seen_mob_position[mob->GetID()] = mob->GetPosition();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user