From 785df23f1bb9ad877827a3599ce821e7d4cdf4ba Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Mar 2026 11:29:13 -0700 Subject: [PATCH] net: dispatch flying movement opcodes (pitch up/down, ascend/descend) for other players 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. --- src/game/game_handler.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 52591c7c..747a557d 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -4475,6 +4475,11 @@ void GameHandler::handlePacket(network::Packet& packet) { case Opcode::MSG_MOVE_STOP_SWIM: case Opcode::MSG_MOVE_SET_WALK_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) { handleOtherPlayerMovement(packet); } @@ -12240,7 +12245,7 @@ void GameHandler::handleCompressedMoves(network::Packet& packet) { // Player movement sub-opcodes (SMSG_MULTIPLE_MOVES carries MSG_MOVE_*) // Not static — wireOpcode() depends on runtime active opcode table. - const std::array kMoveOpcodes = { + const std::array kMoveOpcodes = { wireOpcode(Opcode::MSG_MOVE_START_FORWARD), wireOpcode(Opcode::MSG_MOVE_START_BACKWARD), 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_SET_WALK_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)