summaryrefslogtreecommitdiff
path: root/src/game/game_core.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 21:05:25 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 21:05:25 +0000
commitcc3f42794d134b9f4b6c7efecb07d4b3366887c1 (patch)
tree1cd422d47fc44bd59463d0f9e2ef96f2edb09b50 /src/game/game_core.cpp
parent403cd3acdb7b7fedf2b5e823326611bb32113385 (diff)
downloadopenttd-cc3f42794d134b9f4b6c7efecb07d4b3366887c1.tar.xz
(svn r23632) -Add: GSCompanyMode, to change company in GameScripts
Diffstat (limited to 'src/game/game_core.cpp')
-rw-r--r--src/game/game_core.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/game_core.cpp b/src/game/game_core.cpp
index 9fd579599..ac24853da 100644
--- a/src/game/game_core.cpp
+++ b/src/game/game_core.cpp
@@ -87,9 +87,13 @@
/* static */ void Game::Uninitialize(bool keepConfig)
{
+ Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
+
delete Game::instance;
Game::instance = NULL;
+ cur_company.Restore();
+
if (keepConfig) {
Rescan();
} else {