diff options
author | rubidium <rubidium@openttd.org> | 2008-09-07 11:23:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-09-07 11:23:10 +0000 |
commit | 9474db5cb6c4b9db2f7b68d1dda1a523305282f1 (patch) | |
tree | 94706b006a8848169482c99bfbb9ca6f9c734954 /src/vehicle_func.h | |
parent | f4ee4fd5aed4861fe65757d2c61ce9510c4a6216 (diff) | |
download | openttd-9474db5cb6c4b9db2f7b68d1dda1a523305282f1.tar.xz |
(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.
Diffstat (limited to 'src/vehicle_func.h')
-rw-r--r-- | src/vehicle_func.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vehicle_func.h b/src/vehicle_func.h index ce0c7407f..754004d59 100644 --- a/src/vehicle_func.h +++ b/src/vehicle_func.h @@ -28,10 +28,11 @@ const Vehicle *GetLastVehicleInChain(const Vehicle *v); uint CountVehiclesInChain(const Vehicle *v); bool IsEngineCountable(const Vehicle *v); void DeleteVehicleChain(Vehicle *v); -Vehicle *VehicleFromPos(TileIndex tile, void *data, VehicleFromPosProc *proc); -Vehicle *VehicleFromPosXY(int x, int y, void *data, VehicleFromPosProc *proc); +void FindVehicleOnPos(TileIndex tile, void *data, VehicleFromPosProc *proc); +void FindVehicleOnPosXY(int x, int y, void *data, VehicleFromPosProc *proc); +bool HasVehicleOnPos(TileIndex tile, void *data, VehicleFromPosProc *proc); +bool HasVehicleOnPosXY(int x, int y, void *data, VehicleFromPosProc *proc); void CallVehicleTicks(); -Vehicle *FindVehicleOnTileZ(TileIndex tile, byte z); uint8 CalcPercentVehicleFilled(const Vehicle *v, StringID *color); void InitializeTrains(); @@ -50,8 +51,7 @@ SpriteID GetRotorImage(const Vehicle *v); uint32 VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y); StringID VehicleInTheWayErrMsg(const Vehicle* v); -Vehicle *FindVehicleBetween(TileIndex from, TileIndex to, byte z, bool without_crashed = false); -Vehicle *GetVehicleTunnelBridge(TileIndex tile, TileIndex endtile); +bool HasVehicleOnTunnelBridge(TileIndex tile, TileIndex endtile); void DecreaseVehicleValue(Vehicle *v); void CheckVehicleBreakdown(Vehicle *v); |