1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-18 20:19:11 +00:00

(svn r1563) fix: autoreplaced trains now sets wagon override properly

This commit is contained in:
bjarni
2005-01-19 01:18:29 +00:00
parent f09b0def11
commit 69065b53c8

View File

@@ -1485,6 +1485,15 @@ int32 CmdReplaceVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
}
}
// 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
if ( v->u.rail.first_engine == 0xffff && v->next != NULL ) {
Vehicle *veh = v->next;
do {
veh->u.rail.first_engine = new_engine_type;
} while ( (veh=veh->next) != NULL );
}
break;
}
case VEH_Road: