[Fix] Zone State Spawn2 Location Restore (#4844)

* [Fix] Zone State Spawn2 Location Restore

* Update zone_save_state.cpp

* Update zone_save_state.cpp

* Update zone_save_state.cpp

* Update zone_save_state.cpp
This commit is contained in:
Chris Miles
2025-04-09 21:43:18 -05:00
committed by GitHub
parent 216b3a039f
commit 16e341906d
3 changed files with 50 additions and 8 deletions
+7 -1
View File
@@ -277,7 +277,13 @@ bool Spawn2::Process() {
}
}
NPC *npc = new NPC(tmp, this, glm::vec4(x, y, z, heading), GravityBehavior::Water);
// zone state restore
if (m_stored_location != glm::vec4(0, 0, -1000, 0)) {
loc = m_stored_location;
m_stored_location = glm::vec4(0, 0, -1000, 0);
}
NPC *npc = new NPC(tmp, this, loc, GravityBehavior::Water);
npcthis = npc;