diff options
author | tron <tron@openttd.org> | 2005-12-29 12:42:59 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-12-29 12:42:59 +0000 |
commit | 246c126d250171bd69f66080dbc25fafef6a46d2 (patch) | |
tree | 471052da802f2cc20f631ca0291f7337c78cd45d /openttd.c | |
parent | 1ffc70079787954dda1182de89eca25f36837490 (diff) | |
download | openttd-246c126d250171bd69f66080dbc25fafef6a46d2.tar.xz |
(svn r3353) Simplify the automatic length adjustment algorithm for replacing trains: Use the length of the train before the replacement as reference length
Diffstat (limited to 'openttd.c')
-rw-r--r-- | openttd.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1263,21 +1263,13 @@ bool AfterLoadGame(uint version) } } - /* In version 16.1 of the savegame, trains became aware of station lengths - need to initialized to the invalid state - players needs to set renew_keep_length too */ + /* In version 16.1 of the savegame a player can decide if trains, which get + * replaced, shall keep their old length. In all prior versions, just default + * to false */ if (CheckSavegameVersionOldStyle(16, 1)) { - Vehicle *v; FOR_ALL_PLAYERS(p) { p->renew_keep_length = false; } - - FOR_ALL_VEHICLES(v) { - if (v->type == VEH_Train) { - v->u.rail.shortest_platform[0] = 255; - v->u.rail.shortest_platform[1] = 0; - } - } } /* In version 17, ground type is moved from m2 to m4 for depots and |