From cfc6dc37c84252f0293580fba3bb91eaeb5ac354 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Mar 2026 11:42:54 -0700 Subject: [PATCH] net: fix SMSG_SPLINE_MOVE_UNSET_FLYING and parse UNROOT/UNSET_HOVER/WATER_WALK Previously these four spline-move opcodes were silently consumed with packet.setReadPos(getSize()), skipping even the packed-GUID read. - SMSG_SPLINE_MOVE_UNSET_FLYING: now reads packed guid and fires unitMoveFlagsCallback_(guid, 0) to clear the flying animation state on nearby entities (counterpart to SMSG_SPLINE_MOVE_SET_FLYING). - SMSG_SPLINE_MOVE_UNROOT, SMSG_SPLINE_MOVE_UNSET_HOVER, SMSG_SPLINE_MOVE_WATER_WALK: now properly parse the packed guid instead of consuming the full packet; no animation-state callback needed. --- src/game/game_handler.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 28a9a211..0782e119 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -5165,11 +5165,22 @@ void GameHandler::handlePacket(network::Packet& packet) { // ---- Spline move flag changes for other units ---- case Opcode::SMSG_SPLINE_MOVE_UNROOT: - case Opcode::SMSG_SPLINE_MOVE_UNSET_FLYING: case Opcode::SMSG_SPLINE_MOVE_UNSET_HOVER: - case Opcode::SMSG_SPLINE_MOVE_WATER_WALK: - packet.setReadPos(packet.getSize()); + case Opcode::SMSG_SPLINE_MOVE_WATER_WALK: { + // Minimal parse: PackedGuid only — no animation-relevant state change. + if (packet.getSize() - packet.getReadPos() >= 1) { + (void)UpdateObjectParser::readPackedGuid(packet); + } break; + } + case Opcode::SMSG_SPLINE_MOVE_UNSET_FLYING: { + // PackedGuid + synthesised move-flags=0 → clears flying animation. + if (packet.getSize() - packet.getReadPos() < 1) break; + uint64_t guid = UpdateObjectParser::readPackedGuid(packet); + if (guid == 0 || guid == playerGuid || !unitMoveFlagsCallback_) break; + unitMoveFlagsCallback_(guid, 0u); // clear flying/CAN_FLY + break; + } // ---- Quest failure notification ---- case Opcode::SMSG_QUESTGIVER_QUEST_FAILED: {