From 78e2e4ac4dbf21dce4b9fca3faca50f2c562c978 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 29 Mar 2026 18:28:58 -0700 Subject: [PATCH] fix: locomotionFlags missing SWIMMING and DESCENDING MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The heartbeat throttle bitmask was missing SWIMMING and DESCENDING, treating swimming/descending players as stationary and using a slower heartbeat interval. The identical bitmask in movement_handler.cpp already included SWIMMING — this inconsistency could cause the server to miss position updates during swim combat. --- src/game/game_handler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 32ce3e2e..604ad34a 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -1323,6 +1323,8 @@ void GameHandler::update(float deltaTime) { const bool classicLikeCombatSync = (combatHandler_ && combatHandler_->hasAutoAttackIntent()) && (isPreWotlk()); + // Must match the locomotion bitmask in movement_handler.cpp so both + // sites agree on what constitutes "moving" for heartbeat throttling. const uint32_t locomotionFlags = static_cast(MovementFlags::FORWARD) | static_cast(MovementFlags::BACKWARD) | @@ -1331,6 +1333,8 @@ void GameHandler::update(float deltaTime) { static_cast(MovementFlags::TURN_LEFT) | static_cast(MovementFlags::TURN_RIGHT) | static_cast(MovementFlags::ASCENDING) | + static_cast(MovementFlags::DESCENDING) | + static_cast(MovementFlags::SWIMMING) | static_cast(MovementFlags::FALLING) | static_cast(MovementFlags::FALLINGFAR); const bool classicLikeStationaryCombatSync =