[Position Updates] Bulk updates when player has moved far enough - eliminates client ghosting on rez/gates/summon as well as npc ghosting

This commit is contained in:
Akkadius
2017-08-22 02:13:56 -05:00
parent bb2d8f6a4d
commit 808654743c
5 changed files with 33 additions and 5 deletions
+14
View File
@@ -1455,6 +1455,20 @@ void Mob::SendPosition() {
safe_delete(app);
}
void Mob::SendPositionUpdateToClient(Client *client) {
auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
PlayerPositionUpdateServer_Struct* spawn_update = (PlayerPositionUpdateServer_Struct*)app->pBuffer;
if(this->IsMoving())
MakeSpawnUpdate(spawn_update);
else
MakeSpawnUpdateNoDelta(spawn_update);
client->QueuePacket(app, false);
safe_delete(app);
}
/* Position updates for mobs on the move */
void Mob::SendPositionUpdate(uint8 iSendToSelf) {
auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));