summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-11-26 16:41:14 +0000
committerpeter1138 <peter1138@openttd.org>2005-11-26 16:41:14 +0000
commit87f54ebf92725c36c4ab0aa1b97fe9152e7db5c1 (patch)
treeccd73fcd302984e4abaf2d806bf28bf73a54e79f /openttd.c
parent9a381f4d5d7a575571943b94c94c27b3ae6cad2d (diff)
downloadopenttd-87f54ebf92725c36c4ab0aa1b97fe9152e7db5c1.tar.xz
(svn r3239) - Codechange: Introduce and use helper functions for engine replacement code.
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/openttd.c b/openttd.c
index d93d5d968..a26d2d14e 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1277,11 +1277,7 @@ bool AfterLoadGame(uint version)
* of course, we do need to initialize them for older savegames. */
if (CheckSavegameVersion(16)) {
FOR_ALL_PLAYERS(p) {
- EngineID i;
-
- for (i = 0; i < TOTAL_NUM_ENGINES; i++) {
- p->engine_replacement[i] = INVALID_ENGINE;
- }
+ InitialiseEngineReplacement(p);
p->engine_renew = false;
p->engine_renew_months = -6;
p->engine_renew_money = 100000;