From 7b68c6cefee00b4ad22dc88be07fe033913451c5 Mon Sep 17 00:00:00 2001 From: bjarni Date: Sun, 1 May 2005 15:13:39 +0000 Subject: (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(-) (limited to 'vehicle.c') 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 -- cgit v1.2.3-70-g09d2