mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
anim: add flying state tracking and Fly/FlyIdle animation selection for entities
Previously the move-flags callback only tracked SWIMMING and WALKING, so flying players/mounts always played Run(5) or Stand(0) animations instead of Fly(61)/FlyIdle(60). Changes: - Add creatureFlyingState_ (mirroring creatureSwimmingState_) set by the FLYING flag (0x01000000) in unitMoveFlagsCallback_. - Update animation selection: moving+flying → 61 (Fly/FlyForward), idle+flying → 60 (FlyIdle/hover). Flying takes priority over swim in the priority chain: fly > swim > walk > run. - Clear creatureFlyingState_ on world reset.
This commit is contained in:
parent
a33119c070
commit
30a65320fb
2 changed files with 16 additions and 4 deletions
|
|
@ -190,6 +190,7 @@ private:
|
|||
std::unordered_map<uint64_t, bool> creatureWasMoving_; // guid -> previous-frame movement state
|
||||
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_map<uint64_t, bool> creatureFlyingState_; // guid -> currently flying (FLYING flag)
|
||||
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