mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
game: clear permanent-failure and dead-creature caches on same-map reconnect
After reconnect, `creaturePermanentFailureGuids_` and `deadCreatureGuids_` could retain stale entries for GUIDs not tracked in `creatureInstances_` (creatures that failed to load or died before being spawned). These stale entries would silently block re-spawning or cause wrong death state on the fresh CREATE_OBJECTs the server sends after reconnect. Clear both caches in the reconnect-to-same-map path so server state is authoritative after every reconnect.
This commit is contained in:
parent
a06ac018ea
commit
4f51103cdb
1 changed files with 3 additions and 1 deletions
|
|
@ -1701,10 +1701,12 @@ void Application::setupUICallbacks() {
|
|||
if (mapId == loadedMapId_ && renderer && renderer->getTerrainManager() && isInitialEntry) {
|
||||
LOG_INFO("Reconnect to same map ", mapId, ": clearing stale online entities (terrain preserved)");
|
||||
|
||||
// Pending spawn queues
|
||||
// Pending spawn queues and failure caches
|
||||
pendingCreatureSpawns_.clear();
|
||||
pendingCreatureSpawnGuids_.clear();
|
||||
creatureSpawnRetryCounts_.clear();
|
||||
creaturePermanentFailureGuids_.clear(); // Clear so previously-failed GUIDs can retry
|
||||
deadCreatureGuids_.clear(); // Will be re-populated from fresh server state
|
||||
pendingPlayerSpawns_.clear();
|
||||
pendingPlayerSpawnGuids_.clear();
|
||||
pendingOnlinePlayerEquipment_.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue