[Crash] Fix spawn race condition shown by #repop (#2455)

* Troubleshooting

* Debugging

* Debugging

* Debugging

* Debugging

* Remove debug line

* Revert back to GetRawNPCTypeName
This commit is contained in:
Chris Miles
2022-09-28 21:03:05 -05:00
committed by GitHub
parent 74dfc1ae3c
commit 714fb032e9
3 changed files with 12 additions and 6 deletions
+5
View File
@@ -205,6 +205,11 @@ bool Spawn2::Process() {
return (true);
}
if (tmp->npc_id == 0) {
LogError("NPC type did not load for npc_id [{}]", npcid);
return true;
}
if (tmp->unique_spawn_by_name) {
if (!entity_list.LimitCheckName(tmp->name)) {
LogSpawns("Spawn2 [{}]: Spawn group [{}] yeilded NPC type [{}], which is unique and one already exists", spawn2_id, spawngroup_id_, npcid);