mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
net: dispatch flying movement opcodes (pitch up/down, ascend/descend) for other players
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
MSG_MOVE_START_PITCH_UP, MSG_MOVE_START_PITCH_DOWN, MSG_MOVE_STOP_PITCH, MSG_MOVE_START_ASCEND, MSG_MOVE_STOP_ASCEND were defined in the opcode table but never routed. The server relays these when another player pitches or ascends/descends while flying. Without dispatch, position updates embedded in these packets were silently dropped, causing flying players to appear to not move vertically. Also adds these to the compressed-moves opcode recognition array.
This commit is contained in:
parent
274419584e
commit
785df23f1b
1 changed files with 11 additions and 1 deletions
|
|
@ -4475,6 +4475,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
case Opcode::MSG_MOVE_STOP_SWIM:
|
case Opcode::MSG_MOVE_STOP_SWIM:
|
||||||
case Opcode::MSG_MOVE_SET_WALK_MODE:
|
case Opcode::MSG_MOVE_SET_WALK_MODE:
|
||||||
case Opcode::MSG_MOVE_SET_RUN_MODE:
|
case Opcode::MSG_MOVE_SET_RUN_MODE:
|
||||||
|
case Opcode::MSG_MOVE_START_PITCH_UP:
|
||||||
|
case Opcode::MSG_MOVE_START_PITCH_DOWN:
|
||||||
|
case Opcode::MSG_MOVE_STOP_PITCH:
|
||||||
|
case Opcode::MSG_MOVE_START_ASCEND:
|
||||||
|
case Opcode::MSG_MOVE_STOP_ASCEND:
|
||||||
if (state == WorldState::IN_WORLD) {
|
if (state == WorldState::IN_WORLD) {
|
||||||
handleOtherPlayerMovement(packet);
|
handleOtherPlayerMovement(packet);
|
||||||
}
|
}
|
||||||
|
|
@ -12240,7 +12245,7 @@ void GameHandler::handleCompressedMoves(network::Packet& packet) {
|
||||||
|
|
||||||
// Player movement sub-opcodes (SMSG_MULTIPLE_MOVES carries MSG_MOVE_*)
|
// Player movement sub-opcodes (SMSG_MULTIPLE_MOVES carries MSG_MOVE_*)
|
||||||
// Not static — wireOpcode() depends on runtime active opcode table.
|
// Not static — wireOpcode() depends on runtime active opcode table.
|
||||||
const std::array<uint16_t, 17> kMoveOpcodes = {
|
const std::array<uint16_t, 22> kMoveOpcodes = {
|
||||||
wireOpcode(Opcode::MSG_MOVE_START_FORWARD),
|
wireOpcode(Opcode::MSG_MOVE_START_FORWARD),
|
||||||
wireOpcode(Opcode::MSG_MOVE_START_BACKWARD),
|
wireOpcode(Opcode::MSG_MOVE_START_BACKWARD),
|
||||||
wireOpcode(Opcode::MSG_MOVE_STOP),
|
wireOpcode(Opcode::MSG_MOVE_STOP),
|
||||||
|
|
@ -12258,6 +12263,11 @@ void GameHandler::handleCompressedMoves(network::Packet& packet) {
|
||||||
wireOpcode(Opcode::MSG_MOVE_STOP_SWIM),
|
wireOpcode(Opcode::MSG_MOVE_STOP_SWIM),
|
||||||
wireOpcode(Opcode::MSG_MOVE_SET_WALK_MODE),
|
wireOpcode(Opcode::MSG_MOVE_SET_WALK_MODE),
|
||||||
wireOpcode(Opcode::MSG_MOVE_SET_RUN_MODE),
|
wireOpcode(Opcode::MSG_MOVE_SET_RUN_MODE),
|
||||||
|
wireOpcode(Opcode::MSG_MOVE_START_PITCH_UP),
|
||||||
|
wireOpcode(Opcode::MSG_MOVE_START_PITCH_DOWN),
|
||||||
|
wireOpcode(Opcode::MSG_MOVE_STOP_PITCH),
|
||||||
|
wireOpcode(Opcode::MSG_MOVE_START_ASCEND),
|
||||||
|
wireOpcode(Opcode::MSG_MOVE_STOP_ASCEND),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Track unhandled sub-opcodes once per compressed packet (avoid log spam)
|
// Track unhandled sub-opcodes once per compressed packet (avoid log spam)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue