summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-23 23:59:49 +0000
committerdarkvater <darkvater@openttd.org>2005-01-23 23:59:49 +0000
commitaa5f513d4cca0966d3db7fe9b42effa64be1ecde (patch)
treeb06722ffc6a4dcf88b19219271b016c23b398b04
parenta94a7b0775b207c3d17b33ee76adc7ec3d59c0ca (diff)
downloadopenttd-aa5f513d4cca0966d3db7fe9b42effa64be1ecde.tar.xz
(svn r1632) -Fix: [1108008] Scenario creation bug; engines are of correct year when scenario is saved
-rw-r--r--misc_gui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc_gui.c b/misc_gui.c
index 3ba3d869e..43e3908c7 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -1145,6 +1145,8 @@ static void GenerateFileName(void)
GetString(_edit_str_buf, STR_4004);
}
+extern void StartupEngines(void);
+
static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
{
switch(e->event) {
@@ -1251,6 +1253,9 @@ static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
} else if (HASBIT(w->click_state, 11)) { /* Save button clicked */
_switch_mode = SM_SAVE;
FiosMakeSavegameName(_file_to_saveload.name, WP(w,querystr_d).buf);
+
+ /* In the editor set up the vehicle engines correctly (date might have changed) */
+ if (_game_mode == GM_EDITOR) StartupEngines();
}
break;
case WE_DESTROY: