(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.
This commit is contained in:
rubidium
2008-09-07 11:23:10 +00:00
parent f4ee4fd5ae
commit 9474db5cb6
12 changed files with 246 additions and 155 deletions

View File

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