Core/Players: Improve setting ActivePlayerData::TransportServerTime by including TIME_SYNC and CMSG_QUEUED_MESSAGES_END values in its calculation

* This removes delay on nearby object visibility after login and teleport
This commit is contained in:
Shauren
2025-04-16 16:16:49 +02:00
parent 4dd4cfef8f
commit 821ecf8fa3
10 changed files with 75 additions and 24 deletions

View File

@@ -1853,6 +1853,9 @@ void Map::SendInitSelf(Player* player)
WorldPacket packet;
data.BuildPacket(&packet);
player->SendDirectMessage(&packet);
// client will respond to SMSG_UPDATE_OBJECT that contains ThisIsYou = true with CMSG_MOVE_INIT_ACTIVE_MOVER_COMPLETE
player->GetSession()->RegisterTimeSync(WorldSession::SPECIAL_INIT_ACTIVE_MOVER_TIME_SYNC_COUNTER);
}
void Map::SendInitTransports(Player* player)