mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
game: process partial UPDATE_OBJECT packets when a block parse fails
Previously, if any single block in an SMSG_UPDATE_OBJECT packet failed to parse (e.g. unusual spline flags), the entire packet was dropped and all entities in it were lost. On busy zones with many CREATE_OBJECTs in one packet, one bad NPC movement block would silently suppress all NPCs that followed it in the same packet. - parseUpdateObject: break instead of return false on block failure, so already-parsed blocks are returned to the caller - handleUpdateObject: fall through to process partial data when parsing returns false but some blocks were successfully parsed
This commit is contained in:
parent
54246345bb
commit
d22f4b30ac
2 changed files with 7 additions and 3 deletions
|
|
@ -7327,7 +7327,8 @@ void GameHandler::handleUpdateObject(network::Packet& packet) {
|
|||
static int updateObjErrors = 0;
|
||||
if (++updateObjErrors <= 5)
|
||||
LOG_WARNING("Failed to parse SMSG_UPDATE_OBJECT");
|
||||
return;
|
||||
if (data.blocks.empty()) return;
|
||||
// Fall through: process any blocks that were successfully parsed before the failure.
|
||||
}
|
||||
|
||||
auto extractPlayerAppearance = [&](const std::map<uint16_t, uint32_t>& fields,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue