From 5e2d880c37a193949a4f71cf8378f19e0e1ce770 Mon Sep 17 00:00:00 2001 From: jaxx56 Date: Tue, 12 Apr 2016 23:10:28 -0500 Subject: [PATCH] Implement CMSG_MOVE_TIME_SKIPPED packet! NOTE: This is a WIP, Research still needed but this will sync the player's movement to the server's time by doing a "Skip/Jump" in the time. This may show symptoms of a freeze, eventually smoothing out. A sync may trigger with high latency. --- src/game/WorldHandlers/MiscHandler.cpp | 23 ---------------------- src/game/WorldHandlers/MovementHandler.cpp | 9 +++++++++ 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/src/game/WorldHandlers/MiscHandler.cpp b/src/game/WorldHandlers/MiscHandler.cpp index 32cf9f80..3e213877 100644 --- a/src/game/WorldHandlers/MiscHandler.cpp +++ b/src/game/WorldHandlers/MiscHandler.cpp @@ -890,29 +890,6 @@ void WorldSession::HandleNextCinematicCamera(WorldPacket& /*recv_data*/) DEBUG_LOG("WORLD: Received opcode CMSG_NEXT_CINEMATIC_CAMERA"); } -void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket& recv_data) -{ - /* WorldSession::Update( WorldTimer::getMSTime() );*/ - DEBUG_LOG("WORLD: Received opcode CMSG_MOVE_TIME_SKIPPED"); - - recv_data >> Unused(); - recv_data >> Unused(); - - /* - ObjectGuid guid; - uint32 time_skipped; - recv_data >> guid; - recv_data >> time_skipped; - DEBUG_LOG("WORLD: Received opcode CMSG_MOVE_TIME_SKIPPED"); - - /// TODO - must be need use in mangos - We substract server Lags to move time ( AntiLags ) - for exmaple - GetPlayer()->ModifyLastMoveTime( -int32(time_skipped) ); - */ -} - void WorldSession::HandleFeatherFallAck(WorldPacket& recv_data) { DEBUG_LOG("WORLD: Received opcode CMSG_MOVE_FEATHER_FALL_ACK"); diff --git a/src/game/WorldHandlers/MovementHandler.cpp b/src/game/WorldHandlers/MovementHandler.cpp index 625874e2..bf857059 100644 --- a/src/game/WorldHandlers/MovementHandler.cpp +++ b/src/game/WorldHandlers/MovementHandler.cpp @@ -496,6 +496,15 @@ void WorldSession::HandleSummonResponseOpcode(WorldPacket& recv_data) _player->SummonIfPossible(true); } +void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket& recv_data) +{ + ObjectGuid guid; + uint32 time_skipped; + recv_data >> guid; + recv_data >> time_skipped; + DEBUG_LOG("WORLD: Received opcode CMSG_MOVE_TIME_SKIPPED, guid: %u, time_skipped: %u", guid, time_skipped); +} + bool WorldSession::VerifyMovementInfo(MovementInfo const& movementInfo, ObjectGuid const& guid) const { // ignore wrong guid (player attempt cheating own session for not own guid possible...)