From 9474db5cb6c4b9db2f7b68d1dda1a523305282f1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 7 Sep 2008 11:23:10 +0000 Subject: (svn r14258) -Codechange: rework the way to query the vehicle hash to make sure it always results in the same irregardless of the order of the hash-linked-list. -Fix: desync in PBS reservation following, vehicle flooding and road vehicle overtake/follow code. --- src/tunnelbridge_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tunnelbridge_cmd.cpp') diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index fcf05ffb8..95bb68d7c 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -605,7 +605,7 @@ static CommandCost DoClearTunnel(TileIndex tile, uint32 flags) endtile = GetOtherTunnelEnd(tile); - if (GetVehicleTunnelBridge(tile, endtile) != NULL) return CMD_ERROR; + if (HasVehicleOnTunnelBridge(tile, endtile)) return CMD_ERROR; _build_tunnel_endtile = endtile; @@ -670,7 +670,7 @@ static CommandCost DoClearBridge(TileIndex tile, uint32 flags) endtile = GetOtherBridgeEnd(tile); - if (GetVehicleTunnelBridge(tile, endtile) != NULL) return CMD_ERROR; + if (HasVehicleOnTunnelBridge(tile, endtile)) return CMD_ERROR; direction = GetTunnelBridgeDirection(tile); delta = TileOffsByDiagDir(direction); -- cgit v1.2.3-70-g09d2