summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 5745fadee..81c9dd443 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -62,6 +62,7 @@
#include "hotkeys.h"
#include "newgrf.h"
#include "misc/getoptdata.h"
+#include "game/game.hpp"
#include "town.h"
@@ -284,8 +285,9 @@ static void ShutdownGame()
UnInitWindowSystem();
- /* stop the AI */
+ /* stop the scripts */
AI::Uninitialize(false);
+ Game::Uninitialize();
/* Uninitialize variables that are allocated dynamically */
GamelogReset();
@@ -1253,6 +1255,7 @@ void StateGameLoop()
/* dont execute the state loop during pause */
if (_pause_mode != PM_UNPAUSED) {
UpdateLandscapingLimits();
+ Game::GameLoop();
CallWindowTickEvent();
return;
}
@@ -1291,6 +1294,7 @@ void StateGameLoop()
ClearStorageChanges(true);
AI::GameLoop();
+ Game::GameLoop();
UpdateLandscapingLimits();
CallWindowTickEvent();