diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-11-05 10:40:32 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-11-05 10:40:32 +1100 |
commit | 49cadf79023016ce534c0137c53d342c0f23e875 (patch) | |
tree | db73811c87a61309207231c19cc154ec05946089 /source/game/StarQuestManager.cpp | |
parent | 01770c78db1bcc0dd94daea832611e6cd60e0287 (diff) |
Fix crash when a quest adds a new quest in its update() call
Diffstat (limited to 'source/game/StarQuestManager.cpp')
-rw-r--r-- | source/game/StarQuestManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/game/StarQuestManager.cpp b/source/game/StarQuestManager.cpp index df8a19a..8b85355 100644 --- a/source/game/StarQuestManager.cpp +++ b/source/game/StarQuestManager.cpp @@ -408,9 +408,9 @@ void QuestManager::update(float dt) { } } - for (auto& q : m_quests) { - if (questValidOnServer(q.second)) - q.second->update(dt); + for (auto& q : m_quests.values()) { + if (questValidOnServer(q)) + q->update(dt); } } |