forked from mirror/OpenTTD
(svn r19291) -Codechange: Rename HasVehicleOnTunnelBridge() to TunnelBridgeIsFree() and return a CommandCost status.
This commit is contained in:
@@ -2342,7 +2342,7 @@ static void ClearPathReservation(const Train *v, TileIndex tile, Trackdir track_
|
||||
if (GetTunnelBridgeDirection(tile) == ReverseDiagDir(dir)) {
|
||||
TileIndex end = GetOtherTunnelBridgeEnd(tile);
|
||||
|
||||
if (!HasVehicleOnTunnelBridge(tile, end, v)) {
|
||||
if (TunnelBridgeIsFree(tile, end, v).Succeeded()) {
|
||||
/* Free the reservation only if no other train is on the tiles. */
|
||||
SetTunnelBridgeReservation(tile, false);
|
||||
SetTunnelBridgeReservation(end, false);
|
||||
|
Reference in New Issue
Block a user