fix: locomotionFlags missing SWIMMING and DESCENDING

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.
This commit is contained in:
Kelsi 2026-03-29 18:28:58 -07:00
parent 4e0e234ae9
commit 78e2e4ac4d

View file

@ -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<uint32_t>(MovementFlags::FORWARD) |
static_cast<uint32_t>(MovementFlags::BACKWARD) |
@ -1331,6 +1333,8 @@ void GameHandler::update(float deltaTime) {
static_cast<uint32_t>(MovementFlags::TURN_LEFT) |
static_cast<uint32_t>(MovementFlags::TURN_RIGHT) |
static_cast<uint32_t>(MovementFlags::ASCENDING) |
static_cast<uint32_t>(MovementFlags::DESCENDING) |
static_cast<uint32_t>(MovementFlags::SWIMMING) |
static_cast<uint32_t>(MovementFlags::FALLING) |
static_cast<uint32_t>(MovementFlags::FALLINGFAR);
const bool classicLikeStationaryCombatSync =