From 7669c4d0c27051a82ef000a3230f9ac7d6bcf357 Mon Sep 17 00:00:00 2001 From: bjarni Date: Sun, 1 May 2005 15:13:39 +0000 Subject: [PATCH] (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 --- vehicle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vehicle.c b/vehicle.c index 422d06920d..e5ad395342 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