From 12aa5b6a583aa7ca9092ec6c77e7b12677cdd6a4 Mon Sep 17 00:00:00 2001 From: truebrain Date: Mon, 19 Dec 2011 20:50:54 +0000 Subject: (svn r23604) -Add: initial support for GameScripts --- src/openttd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/openttd.cpp') 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(); -- cgit v1.2.3-70-g09d2