summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-05-01 15:13:39 +0000
committerbjarni <bjarni@openttd.org>2005-05-01 15:13:39 +0000
commit7b68c6cefee00b4ad22dc88be07fe033913451c5 (patch)
tree37f0f98d3e59fae77f6b6d96614eba5ab81360ad
parente32aa54a4121f337c9cf52b7864f2584941e8aaf (diff)
downloadopenttd-7b68c6cefee00b4ad22dc88be07fe033913451c5.tar.xz
(svn r2239) -Fix [autoreplace]: [ 1185653 ] autoreplacing a dualheaded engine into a singleheaded engine is no longer a potiontial crash
It do have one side effect through. Now no engines are added/removed from the train anymore, so it produces "half dualheaded engines" This will be fixed when autoreplace will get a major overhaul at a later date
-rw-r--r--vehicle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 422d06920..e5ad39534 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1456,7 +1456,8 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
} else {
v->cargo_type = rvi->cargo_type;
}
-
+#if 0
+// we disable this because they can crash the game. They will be fixed at a later date
if ( rvi2->flags & RVI_MULTIHEAD && !(rvi->flags & RVI_MULTIHEAD) && v->index == first->index) {
if (old_engine_type == u->engine_type ) {
Vehicle *w;
@@ -1481,6 +1482,7 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
}
}
}
+#endif
// updates the id of the front engine in the other units, since the front engine just got a new engine_id
// this is needed for wagon override