mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r14558) -Fix (r13957): Converting the track type of a tunnel/bridge could cause trains to get stuck.
This commit is contained in:
parent
6d94be75e9
commit
f649496caa
@ -1393,7 +1393,8 @@ CommandCost CmdConvertRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
Track track = DiagDirToDiagTrack(GetTunnelBridgeDirection(tile));
|
||||
if (GetTunnelBridgeReservation(tile)) {
|
||||
Vehicle *v = GetTrainForReservation(tile, track);
|
||||
if (v != NULL) {
|
||||
if (v != NULL && !HasPowerOnRail(v->u.rail.railtype, totype)) {
|
||||
/* No power on new rail type, reroute. */
|
||||
FreeTrainTrackReservation(v);
|
||||
*vehicles_affected.Append() = v;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user