(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

@@ -1506,7 +1506,7 @@ static CommandCost RemoveRoadStop(Station *st, uint32 flags, TileIndex tile)
/* don't do the check for drive-through road stops when company bankrupts */
if (IsDriveThroughStopTile(tile) && (flags & DC_BANKRUPT)) {
/* remove the 'going through road stop' status from all vehicles on that tile */
if (flags & DC_EXEC) VehicleFromPos(tile, NULL, &ClearRoadStopStatusEnum);
if (flags & DC_EXEC) FindVehicleOnPos(tile, NULL, &ClearRoadStopStatusEnum);
} else {
if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
}