fix: abort movement block on spline parse failure instead of corrupting stream

When both WotLK compressed and uncompressed spline point parsing fail,
the parser was silently continuing with a corrupted read position (16
bytes of WotLK spline header already consumed). This caused the update
mask to read garbage (maskBlockCount=40), corrupting the current entity
AND all remaining blocks in the same UPDATE_OBJECT packet.

Now returns false on spline failure, cleanly aborting the single block
parse and allowing the remaining blocks to be recovered (if the parser
can resync). Also logs the failing GUID and spline flags for debugging.

This fixes:
- Entities spawning with displayId=0/entry=0 (corrupted parse)
- "Unknown update type: 128" errors from reading garbage
- Falling through the ground (terrain entities lost in corrupted batch)
- Phantom "fish on your line" from fishing bobber entity parse failure
This commit is contained in:
Kelsi 2026-03-28 10:31:53 -07:00
parent ed8ff5c8ac
commit b8a9efb721

View file

@ -1036,6 +1036,12 @@ bool UpdateObjectParser::parseMovementBlock(network::Packet& packet, UpdateBlock
if (!splineParsed) {
splineParsed = tryParseSplinePoints(false, "wotlk-uncompressed");
}
if (!splineParsed) {
LOG_WARNING("Spline parse failed for guid=0x", std::hex, block.guid, std::dec,
" splineFlags=0x", std::hex, splineFlags, std::dec,
" — aborting movement block");
return false;
}
}
}
else if (updateFlags & UPDATEFLAG_POSITION) {