mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix zombie renderer instances on same-map SMSG_NEW_WORLD teleports
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
When SMSG_NEW_WORLD fires with the same map ID (dungeon wing teleporters, GM teleports, etc.), entityManager.clear() was called but renderer instances in creatureInstances_/playerInstances_/gameObjectInstances_ were never despawned. Fresh CREATE_OBJECTs from the server hit the early-return guard (guid already in creatureInstances_) and were skipped, leaving entities in the entity manager without matching renderer state. Fix: pass isSameMap as isInitialEntry to the world-entry callback. This routes same-map SMSG_NEW_WORLD through the reconnect path which properly despawns all renderer instances before the server resends CREATE_OBJECTs.
This commit is contained in:
parent
7dbf950323
commit
6dd7213083
1 changed files with 6 additions and 2 deletions
|
|
@ -17111,9 +17111,13 @@ void GameHandler::handleNewWorld(network::Packet& packet) {
|
|||
LOG_INFO("Sent MSG_MOVE_WORLDPORT_ACK");
|
||||
}
|
||||
|
||||
// Reload terrain at new position
|
||||
// Reload terrain at new position.
|
||||
// Pass isSameMap as isInitialEntry so the application despawns and
|
||||
// re-registers renderer instances before the server resends CREATE_OBJECTs.
|
||||
// Without this, same-map SMSG_NEW_WORLD (dungeon wing teleporters, etc.)
|
||||
// leaves zombie renderer instances that block fresh entity spawns.
|
||||
if (worldEntryCallback_) {
|
||||
worldEntryCallback_(mapId, serverX, serverY, serverZ, false);
|
||||
worldEntryCallback_(mapId, serverX, serverY, serverZ, isSameMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue