summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-09-10 20:03:45 +0000
committerrubidium <rubidium@openttd.org>2010-09-10 20:03:45 +0000
commitc0ba81e617de24b1965814785faa75a00bc042f0 (patch)
tree751ff0e5bbb23b879f595ba056b8c517044bff07
parenta3fc7c05bfe19d0bc1d072219b0f8bf65b6ec0ca (diff)
downloadopenttd-c0ba81e617de24b1965814785faa75a00bc042f0.tar.xz
(svn r20783) -Change/Fix: do autosave-on-exit as well when using kill/CTRL-C to terminate a dedicated OpenTTD
-rw-r--r--src/video/dedicated_v.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp
index 6553aeec0..2e35f4678 100644
--- a/src/video/dedicated_v.cpp
+++ b/src/video/dedicated_v.cpp
@@ -23,6 +23,7 @@
#include "../blitter/factory.hpp"
#include "../company_func.h"
#include "../core/random_func.hpp"
+#include "../saveload/saveload.h"
#include "dedicated_v.h"
#ifdef BEOS_NET_SERVER
@@ -70,6 +71,7 @@ static void OS2_SwitchToConsoleMode()
/* Signal handlers */
static void DedicatedSignalHandler(int sig)
{
+ if (_game_mode == GM_NORMAL && _settings_client.gui.autosave_on_exit) DoExitSave();
_exit_game = true;
signal(sig, DedicatedSignalHandler);
}