From a58115041ffcc3f979b5509e34621cd96c088907 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 23 Feb 2026 05:13:26 -0800 Subject: [PATCH] Fix spline parsing always falling through to compact format The legacy spline parser successfully read points but then unconditionally rewound and re-parsed as compact format. When the data was actually legacy format, the compact parser would read garbage and fail, causing the entire update block (and all subsequent blocks in the packet) to be dropped. This made creatures invisible when their spawn packet contained a spline. --- src/game/world_packets.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/world_packets.cpp b/src/game/world_packets.cpp index e044d78a..d84114bd 100644 --- a/src/game/world_packets.cpp +++ b/src/game/world_packets.cpp @@ -950,9 +950,8 @@ bool UpdateObjectParser::parseMovementBlock(network::Packet& packet, UpdateBlock /*float endPointX =*/ packet.readFloat(); /*float endPointY =*/ packet.readFloat(); /*float endPointZ =*/ packet.readFloat(); - LOG_DEBUG(" Spline pointCount=", pointCount); - } - + LOG_DEBUG(" Spline pointCount=", pointCount, " (legacy)"); + } else { // Legacy pointCount looks invalid; try compact WotLK layout as recovery. // This keeps malformed/variant packets from desyncing the whole update block. packet.setReadPos(legacyStart); @@ -996,6 +995,7 @@ bool UpdateObjectParser::parseMovementBlock(network::Packet& packet, UpdateBlock if (!bytesAvailable(compactPayloadBytes)) return false; packet.setReadPos(packet.getReadPos() + compactPayloadBytes); } + } // end else (compact fallback) } } else if (updateFlags & UPDATEFLAG_POSITION) {