mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
net/game: initialise entity swim/walk state from spawn packet and SPLINE_MOVE opcodes
UpdateBlock now stores moveFlags from the LIVING movement block so the cold-join problem is fixed: entities already swimming or walking when the client joins get their animation state correctly initialised from the SMSG_UPDATE_OBJECT CREATE_OBJECT packet rather than waiting for the next MSG_MOVE_* heartbeat. Additionally, SMSG_SPLINE_MOVE_START_SWIM, SMSG_SPLINE_MOVE_STOP_SWIM, SMSG_SPLINE_MOVE_SET_WALK_MODE, SMSG_SPLINE_MOVE_SET_RUN_MODE, and SMSG_SPLINE_MOVE_SET_FLYING now fire unitMoveFlagsCallback_ with synthesised flags so explicit server-driven mode transitions update animation state immediately without waiting for a heartbeat.
This commit is contained in:
parent
3439df0333
commit
863ea742f6
3 changed files with 35 additions and 7 deletions
|
|
@ -481,6 +481,10 @@ struct UpdateBlock {
|
|||
// Update flags from movement block (for detecting transports, etc.)
|
||||
uint16_t updateFlags = 0;
|
||||
|
||||
// Raw movement flags from LIVING block (SWIMMING=0x200000, WALKING=0x100, CAN_FLY=0x800000, FLYING=0x1000000)
|
||||
// Used to initialise swim/walk/fly state on entity spawn (cold-join).
|
||||
uint32_t moveFlags = 0;
|
||||
|
||||
// Transport data from LIVING movement block (MOVEMENTFLAG_ONTRANSPORT)
|
||||
bool onTransport = false;
|
||||
uint64_t transportGuid = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue