summaryrefslogtreecommitdiff
path: root/src/game/game_instance.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2012-08-13 19:22:26 +0000
committeryexo <yexo@openttd.org>2012-08-13 19:22:26 +0000
commit54aa43c81b4adbaaf1eaab03062fa871d85fbeab (patch)
tree7f7ca92995edd09bd9dc41499d1aae60d8869bc3 /src/game/game_instance.cpp
parent51921552536d2fbc56c8cdaf682da038e26a168c (diff)
downloadopenttd-54aa43c81b4adbaaf1eaab03062fa871d85fbeab.tar.xz
(svn r24468) -Add [FS#5219]: API compatibility scripts for Goal Scripts (Hirundo)
Diffstat (limited to 'src/game/game_instance.cpp')
-rw-r--r--src/game/game_instance.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/game_instance.cpp b/src/game/game_instance.cpp
index 120491715..df52ca91a 100644
--- a/src/game/game_instance.cpp
+++ b/src/game/game_instance.cpp
@@ -89,6 +89,8 @@ GameInstance::GameInstance() :
void GameInstance::Initialize(GameInfo *info)
{
+ this->versionAPI = info->GetAPIVersion();
+
/* Register the GameController */
SQGSController_Register(this->engine);
@@ -192,6 +194,8 @@ void GameInstance::RegisterAPI()
SQGSWindow_Register(this->engine);
RegisterGameTranslation(this->engine);
+
+ if (!this->LoadCompatibilityScripts(this->versionAPI, GAME_DIR)) this->Died();
}
int GameInstance::GetSetting(const char *name)