mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-05 04:33:51 +00:00
fix: spline parse order (WotLK-first) fixes missing NPCs; bound WMO liquid loading
Spline auto-detection: try WotLK format before Classic to prevent false-positive matches where durationMod float bytes resemble a valid Classic pointCount. This caused the movement block to consume wrong byte count, corrupting the update mask read (maskBlockCount=57/129/203 instead of ~5) and silently dropping NPC spawns. Terrain latency: bound WMO liquid group loading to 4 groups per advanceFinalization call. Large WMOs (e.g., Stormwind canals with 40+ liquid groups) previously loaded all groups in one unbounded loop, blowing past the 8ms frame budget and causing stalls up to 1300ms. Now yields back to processReadyTiles() after 4 groups so the time budget check can break out.
This commit is contained in:
parent
d26eed1e7c
commit
a795239e77
3 changed files with 58 additions and 27 deletions
|
|
@ -1019,12 +1019,11 @@ bool UpdateObjectParser::parseMovementBlock(network::Packet& packet, UpdateBlock
|
|||
return true;
|
||||
};
|
||||
|
||||
// --- Try 1: Classic format (uncompressed points immediately after splineId) ---
|
||||
bool splineParsed = tryParseSplinePoints(false, "classic");
|
||||
|
||||
// --- Try 2: WotLK format (durationMod+durationModNext+conditional+compressed points) ---
|
||||
if (!splineParsed) {
|
||||
packet.setReadPos(afterSplineId);
|
||||
// --- Try 1: WotLK format (durationMod+durationModNext+parabolic+compressed points) ---
|
||||
// Try WotLK first since this is a WotLK parser; Classic auto-detect can false-positive
|
||||
// when durationMod bytes happen to look like a valid Classic pointCount.
|
||||
bool splineParsed = false;
|
||||
{
|
||||
bool wotlkOk = bytesAvailable(8); // durationMod + durationModNext
|
||||
if (wotlkOk) {
|
||||
/*float durationMod =*/ packet.readFloat();
|
||||
|
|
@ -1050,6 +1049,12 @@ bool UpdateObjectParser::parseMovementBlock(network::Packet& packet, UpdateBlock
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- Try 2: Classic format (uncompressed points immediately after splineId) ---
|
||||
if (!splineParsed) {
|
||||
packet.setReadPos(afterSplineId);
|
||||
splineParsed = tryParseSplinePoints(false, "classic");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (updateFlags & UPDATEFLAG_POSITION) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue