mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-27 17:32:06 +00:00
(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
This commit is contained in:
parent
e32aa54a41
commit
7b68c6cefe
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user