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.
This commit is contained in:
Kelsi 2026-02-20 17:53:33 -08:00
parent 1ce406c9e1
commit a11c9ae22b

View file

@ -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<uint64_t> hostileAttackers_;