mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
game/rendering: drive player stand-state animation from SMSG_STANDSTATE_UPDATE
Add StandStateCallback to GameHandler, fired when the server confirms a stand state change (SMSG_STANDSTATE_UPDATE). Connect in Application to map the WoW stand state (0-8) to M2 animation IDs on the player character model: - 0 = Stand → anim 0 (Stand) - 1-6 = Sit variants → anim 27 (SitGround) - 7 = Dead → anim 1 (Death) - 8 = Kneel → anim 72 (Kneel) Sit and Kneel animations are looped so the held-pose frame stays visible; Death stays on the final frame.
This commit is contained in:
parent
59c50e3beb
commit
9f3c236c48
3 changed files with 33 additions and 0 deletions
|
|
@ -4253,6 +4253,9 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
LOG_INFO("Stand state updated: ", static_cast<int>(standState_),
|
||||
" (", standState_ == 0 ? "stand" : standState_ == 1 ? "sit"
|
||||
: standState_ == 7 ? "dead" : standState_ == 8 ? "kneel" : "other", ")");
|
||||
if (standStateCallback_) {
|
||||
standStateCallback_(standState_);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Opcode::SMSG_NEW_TAXI_PATH:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue