Only resume NPC if npc_id is ready (#4875)

This commit is contained in:
JJ
2025-05-02 16:25:18 -04:00
committed by GitHub
parent 5919bb4dea
commit 138612bc88
+1 -1
View File
@@ -517,7 +517,7 @@ bool Zone::LoadZoneState(
new_spawn->SetStoredLocation(glm::vec4(s.x, s.y, s.z, s.heading)); new_spawn->SetStoredLocation(glm::vec4(s.x, s.y, s.z, s.heading));
if (spawn_time_left == 0) { if (spawn_time_left == 0 && s.npc_id > 0) {
new_spawn->SetResumedNPCID(s.npc_id); new_spawn->SetResumedNPCID(s.npc_id);
new_spawn->SetResumedFromZoneSuspend(true); new_spawn->SetResumedFromZoneSuspend(true);
new_spawn->SetEntityVariables(GetVariablesDeserialized(s.entity_variables)); new_spawn->SetEntityVariables(GetVariablesDeserialized(s.entity_variables));