(svn r19291) -Codechange: Rename HasVehicleOnTunnelBridge() to TunnelBridgeIsFree() and return a CommandCost status.

This commit is contained in:
alberth
2010-02-28 18:15:19 +00:00
parent 986d15ef73
commit 63dd6ce6b0
6 changed files with 23 additions and 15 deletions

View File

@@ -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);