mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-26 21:13:51 +00:00
game/rendering: drive Walk(4) and swim state from movement flags
Add UnitMoveFlagsCallback fired on every MSG_MOVE_* with the raw movement flags field. Application.cpp uses it to update swimming and walking state from any packet, not just explicit START_SWIM/ STOP_SWIM opcodes — fixing cold-join cases where a player is already swimming when we enter the world. Per-frame animation sync now selects Walk(4) when the WALKING flag is set, Run(5) otherwise, and Swim(42)/SwimIdle(41) when swimming. UnitAnimHintCallback is simplified to jump (38=JumpMid) only.
This commit is contained in:
parent
333ada8eb6
commit
d7ebc5c8c7
4 changed files with 41 additions and 24 deletions
|
|
@ -188,7 +188,8 @@ private:
|
|||
std::unordered_map<uint64_t, uint32_t> creatureModelIds_; // guid → loaded modelId
|
||||
std::unordered_map<uint64_t, glm::vec3> creatureRenderPosCache_; // guid -> last synced render position
|
||||
std::unordered_map<uint64_t, bool> creatureWasMoving_; // guid -> previous-frame movement state
|
||||
std::unordered_map<uint64_t, bool> creatureSwimmingState_; // guid -> currently in swim mode
|
||||
std::unordered_map<uint64_t, bool> creatureSwimmingState_; // guid -> currently in swim mode (SWIMMING flag)
|
||||
std::unordered_map<uint64_t, bool> creatureWalkingState_; // guid -> walking (WALKING flag, selects Walk(4) vs Run(5))
|
||||
std::unordered_set<uint64_t> creatureWeaponsAttached_; // guid set when NPC virtual weapons attached
|
||||
std::unordered_map<uint64_t, uint8_t> creatureWeaponAttachAttempts_; // guid -> attach attempts
|
||||
std::unordered_map<uint32_t, bool> modelIdIsWolfLike_; // modelId → cached wolf/worg check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue