summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-01-18 15:05:01 +0000
committerbjarni <bjarni@openttd.org>2006-01-18 15:05:01 +0000
commite35a13115309b931e1ce345c628ef5cf07332773 (patch)
tree2589f397d6cadd825e634a774f30c2fd7055752c /openttd.c
parentb87b5f1187b3b31b9085f008017a65693654b67b (diff)
downloadopenttd-e35a13115309b931e1ce345c628ef5cf07332773.tar.xz
(svn r3403) -Codechange: [multiheaded engines] the references between the front and rear engines are no longer saved
instead the pointers are generated on load
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openttd.c b/openttd.c
index d84e73b18..28c97c3b5 100644
--- a/openttd.c
+++ b/openttd.c
@@ -40,6 +40,7 @@
#include "depot.h"
#include "waypoint.h"
#include "ai/ai.h"
+#include "train.h"
#include <stdarg.h>
@@ -1144,6 +1145,10 @@ bool AfterLoadGame(void)
* subtype to the new format */
if (CheckSavegameVersionOldStyle(17, 1)) ConvertOldMultiheadToNew();
+ /* Connect front and rear engines of multiheaded trains
+ since this info were no longer saved in savegame version 20 */
+ if (!CheckSavegameVersion(20)) ConnectMultiheadedTrains();
+
// Update current year
SetDate(_date);