diff options
Diffstat (limited to 'src/openvic-simulation/GameManager.cpp')
-rw-r--r-- | src/openvic-simulation/GameManager.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/openvic-simulation/GameManager.cpp b/src/openvic-simulation/GameManager.cpp index ee5050d..0b42230 100644 --- a/src/openvic-simulation/GameManager.cpp +++ b/src/openvic-simulation/GameManager.cpp @@ -13,12 +13,11 @@ void GameManager::set_needs_update() { } void GameManager::update_state() { - if (needs_update) { - Logger::info("Update: ", today); - map.update_state(today); - if (state_updated) state_updated(); - needs_update = false; - } + if (!needs_update) return; + Logger::info("Update: ", today); + map.update_state(today); + if (state_updated) state_updated(); + needs_update = false; } /* REQUIREMENTS: |