[Bugfix] Prevent depops from blocking new spawns. (#4841)

This commit is contained in:
zimp-wow
2025-04-09 21:11:05 -05:00
committed by GitHub
parent e16b481ba2
commit c2989e019a
+7
View File
@@ -3159,6 +3159,13 @@ void EntityList::Depop(bool StartSpawnTimer)
UpdateFindableNPCState(pnpc, true);
}
// Depop below will eventually remove this npc from the entity list
// but that can happen AFTER we've already tried to spawn its replacement.
// So go ahead and remove it from the limits so it doesn't count.
if (npc_limit_list.count(pnpc->GetID())) {
npc_limit_list.erase(pnpc->GetID());
}
pnpc->WipeHateList();
pnpc->Depop(StartSpawnTimer);
}