summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-01-29 23:04:51 +0000
committerbjarni <bjarni@openttd.org>2006-01-29 23:04:51 +0000
commit6f183780c9563c32f56ed169e0b504c538f71ebc (patch)
treecaede39d14b8200f70f0ecfa943c2a9e301e7885 /train_cmd.c
parent32b6f9e618330075c9712589b25d7e20a42652cc (diff)
downloadopenttd-6f183780c9563c32f56ed169e0b504c538f71ebc.tar.xz
(svn r3484) -fix: fixed issue in last commit where loading savegame versions 18 and 19 didn't init the multiheaded engine pointers
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 131e21cd2..ba350753d 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -3618,41 +3618,6 @@ void ConvertOldMultiheadToNew(void)
default: NOT_REACHED(); break;
}
END_ENUM_WAGONS(u)
- u = v;
- BEGIN_ENUM_WAGONS(u)
- const RailVehicleInfo *rvi = RailVehInfo(u->engine_type);
-
- if (u->u.rail.other_multiheaded_part != NULL) continue;
-
- if (rvi->flags & RVI_MULTIHEAD) {
- if (!IsTrainEngine(u)) {
- /* we got a rear car without a front car. We will convert it to a front one */
- SetTrainEngine(u);
- u->spritenum--;
- }
-
- {
- Vehicle *w;
-
- for(w = u->next; w != NULL && (w->engine_type != u->engine_type || w->u.rail.other_multiheaded_part != NULL); w = GetNextVehicle(w));
- if (w != NULL) {
- /* we found a car to partner with this engine. Now we will make sure it face the right way */
- if (IsTrainEngine(w)) {
- ClearTrainEngine(w);
- w->spritenum++;
- }
- }
-
- if (w != NULL) {
- w->u.rail.other_multiheaded_part = u;
- u->u.rail.other_multiheaded_part = w;
- } else {
- /* we got a front car and no rear cars. We will fake this one for forget that it should have been multiheaded */
- ClearMultiheaded(u);
- }
- }
- }
- END_ENUM_WAGONS(u)
}
}
}