mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-30 02:13:53 +00:00
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:
parent
ed8ff5c8ac
commit
b8a9efb721
1 changed files with 6 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue