From a11c9ae22b6dbde3d3faec5e293421499e40cbd7 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 20 Feb 2026 17:53:33 -0800 Subject: [PATCH] Add melee auto-attack range state fields to GameHandler Declare autoAttackOutOfRangeTime_ and autoAttackRangeWarnCooldown_ in GameHandler to match existing combat logic in game_handler.cpp and keep header/source state in sync. --- include/game/game_handler.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/game/game_handler.hpp b/include/game/game_handler.hpp index 8c2bbb90..0fd83186 100644 --- a/include/game/game_handler.hpp +++ b/include/game/game_handler.hpp @@ -1375,6 +1375,8 @@ private: bool autoAttackRequested_ = false; // local intent (CMSG_ATTACKSWING sent) uint64_t autoAttackTarget = 0; bool autoAttackOutOfRange_ = false; + float autoAttackOutOfRangeTime_ = 0.0f; + float autoAttackRangeWarnCooldown_ = 0.0f; float autoAttackResendTimer_ = 0.0f; // Re-send CMSG_ATTACKSWING every ~1s while attacking float autoAttackFacingSyncTimer_ = 0.0f; // Periodic facing sync while meleeing std::unordered_set hostileAttackers_;