mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Performance] Re-use ClientUpdate packet memory (#4619)
This commit is contained in:
@@ -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