forked from mirror/OpenTTD
(svn r2109) -Fix: use FindVehicleOnTileZ(tile, 0) over FindVehicleBetween(tile, tile, 0)
This commit is contained in:
10
vehicle.c
10
vehicle.c
@@ -117,6 +117,16 @@ bool EnsureNoVehicleZ(TileIndex tile, byte z)
|
||||
return VehicleFromPos(tile, &ti, EnsureNoVehicleProcZ) == NULL;
|
||||
}
|
||||
|
||||
Vehicle *FindVehicleOnTileZ(TileIndex tile, byte z)
|
||||
{
|
||||
TileInfo ti;
|
||||
|
||||
ti.tile = tile;
|
||||
ti.z = z;
|
||||
|
||||
return VehicleFromPos(tile, &ti, EnsureNoVehicleProcZ);
|
||||
}
|
||||
|
||||
Vehicle *FindVehicleBetween(TileIndex from, TileIndex to, byte z)
|
||||
{
|
||||
int x1 = TileX(from);
|
||||
|
Reference in New Issue
Block a user