(svn r1632) -Fix: [1108008] Scenario creation bug; engines are of correct year when scenario is saved
authordarkvater
Sun, 23 Jan 2005 23:59:49 +0000
changeset 1131 21a18a6c1b4b
parent 1130 236aa7efbe7a
child 1132 7378651941bf
(svn r1632) -Fix: [1108008] Scenario creation bug; engines are of correct year when scenario is saved
misc_gui.c
--- a/misc_gui.c	Sun Jan 23 23:58:35 2005 +0000
+++ b/misc_gui.c	Sun Jan 23 23:59:49 2005 +0000
@@ -1145,6 +1145,8 @@
 	GetString(_edit_str_buf, STR_4004);
 }
 
+extern void StartupEngines(void);
+
 static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
 {
 	switch(e->event) {
@@ -1251,6 +1253,9 @@
 		} 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: