Changeset - r12221:ff582fb76dde
[Not reviewed]
master
0 13 0
smatz - 15 years ago 2009-06-24 19:26:41
smatz@openttd.org
(svn r16646) -Codechange: rename GetDepotByTile() to Depot::GetByTile()
13 files changed with 21 insertions and 21 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_order.cpp
Show inline comments
 
@@ -336,25 +336,25 @@ static const Order *ResolveOrder(Vehicle
 
	switch (::GetOrderTypeByTile(destination)) {
 
		case OT_GOTO_DEPOT: {
 
			OrderDepotTypeFlags odtf = (OrderDepotTypeFlags)(ODTFB_PART_OF_ORDERS | ((order_flags & AIOF_SERVICE_IF_NEEDED) ? ODTFB_SERVICE : 0));
 
			OrderDepotActionFlags odaf = (OrderDepotActionFlags)(ODATF_SERVICE_ONLY | ((order_flags & AIOF_STOP_IN_DEPOT) ? ODATFB_HALT : 0));
 
			OrderNonStopFlags onsf = (OrderNonStopFlags)((order_flags & AIOF_NON_STOP_INTERMEDIATE) ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE);
 
			/* Check explicitly if the order is to a station (for aircraft) or
 
			 * to a depot (other vehicle types). */
 
			if (::Vehicle::Get(vehicle_id)->type == VEH_AIRCRAFT) {
 
				if (!::IsTileType(destination, MP_STATION)) return false;
 
				order.MakeGoToDepot(::GetStationIndex(destination), odtf, onsf, odaf);
 
			} else {
 
				if (::IsTileType(destination, MP_STATION)) return false;
 
				order.MakeGoToDepot(::GetDepotByTile(destination)->index, odtf, onsf, odaf);
 
				order.MakeGoToDepot(::Depot::GetByTile(destination)->index, odtf, onsf, odaf);
 
			}
 
			break;
 
		}
 

	
 
		case OT_GOTO_STATION:
 
			order.MakeGoToStation(::GetStationIndex(destination));
 
			order.SetLoadType((OrderLoadFlags)GB(order_flags, 5, 3));
 
			order.SetUnloadType((OrderUnloadFlags)GB(order_flags, 2, 3));
 
			order.SetStopLocation(OSL_PLATFORM_FAR_END);
 
			break;
 

	
 
		case OT_GOTO_WAYPOINT:
src/depot.cpp
Show inline comments
 
@@ -8,28 +8,28 @@
 
#include "order_func.h"
 
#include "window_func.h"
 
#include "core/bitmath_func.hpp"
 
#include "tile_map.h"
 
#include "water_map.h"
 
#include "core/pool_func.hpp"
 

	
 
DepotPool _depot_pool("Depot");
 
INSTANTIATE_POOL_METHODS(Depot)
 

	
 
/**
 
 * Gets a depot from a tile
 
 *
 
 * @param tile tile with depot
 
 * @return Returns the depot if the tile had a depot, else it returns NULL
 
 */
 
Depot *GetDepotByTile(TileIndex tile)
 
/* static */ Depot *Depot::GetByTile(TileIndex tile)
 
{
 
	/* A ship depot is multiple tiles. The north most tile is
 
	 * always the ->xy tile, so make sure we always look for
 
	 * the nothern tile and not the southern one. */
 
	if (IsShipDepotTile(tile)) {
 
		tile = min(tile, GetOtherShipDepotTile(tile));
 
	}
 

	
 
	Depot *depot;
 

	
 
	FOR_ALL_DEPOTS(depot) {
 
		if (depot->xy == tile) return depot;
src/depot_base.h
Show inline comments
 
@@ -10,20 +10,20 @@
 
#include "core/pool_type.hpp"
 
#include "town_type.h"
 

	
 
typedef Pool<Depot, DepotID, 64, 64000> DepotPool;
 
extern DepotPool _depot_pool;
 

	
 
struct Depot : DepotPool::PoolItem<&_depot_pool> {
 
	TileIndex xy;
 
	TownID town_index;
 

	
 
	Depot(TileIndex xy = INVALID_TILE) : xy(xy) {}
 
	~Depot();
 

	
 
	static Depot *GetByTile(TileIndex tile);
 
};
 

	
 
Depot *GetDepotByTile(TileIndex tile);
 

	
 
#define FOR_ALL_DEPOTS_FROM(var, start) FOR_ALL_ITEMS_FROM(Depot, depot_index, var, start)
 
#define FOR_ALL_DEPOTS(var) FOR_ALL_DEPOTS_FROM(var, 0)
 

	
 
#endif /* DEPOT_BASE_H */
src/depot_gui.cpp
Show inline comments
 
@@ -332,25 +332,25 @@ struct DepotWindow : Window {
 
			}
 
			/* Always have 1 empty row, so people can change the setting of the train */
 
			SetVScrollCount(w, this->vehicle_list.Length() + this->wagon_list.Length() + 1);
 
			SetHScrollCount(w, WagonLengthToPixels(hnum));
 
		} else {
 
			SetVScrollCount(w, (this->vehicle_list.Length() + this->hscroll.cap - 1) / this->hscroll.cap);
 
		}
 

	
 
		/* locate the depot struct */
 
		if (this->type == VEH_AIRCRAFT) {
 
			SetDParam(0, GetStationIndex(tile)); // Airport name
 
		} else {
 
			Depot *depot = GetDepotByTile(tile);
 
			Depot *depot = Depot::GetByTile(tile);
 
			assert(depot != NULL);
 

	
 
			SetDParam(0, depot->town_index);
 
		}
 

	
 
		w->DrawWidgets();
 

	
 
		uint16 num = this->vscroll.pos * boxes_in_each_row;
 
		maxval = min(this->vehicle_list.Length(), num + (rows_in_display * boxes_in_each_row));
 

	
 
		for (x = 2, y = 15; num < maxval; y += this->resize.step_height, x = 2) { // Draw the rows
 
			byte i;
 
@@ -806,25 +806,25 @@ struct DepotWindow : Window {
 
			case DEPOT_WIDGET_SELL_ALL:
 
				/* Only open the confimation window if there are anything to sell */
 
				if (this->vehicle_list.Length() != 0 || this->wagon_list.Length() != 0) {
 
					static const StringID confirm_captions[] = {
 
						STR_DEPOT_TRAIN_CAPTION,
 
						STR_DEPOT_ROAD_CAPTION,
 
						STR_DEPOT_SHIP_CAPTION,
 
						STR_DEPOT_AIRCRAFT_CAPTION
 
					};
 
					TileIndex tile = this->window_number;
 
					byte vehtype = this->type;
 

	
 
					SetDParam(0, (vehtype == VEH_AIRCRAFT) ? GetStationIndex(tile) : GetDepotByTile(tile)->town_index);
 
					SetDParam(0, (vehtype == VEH_AIRCRAFT) ? GetStationIndex(tile) : Depot::GetByTile(tile)->town_index);
 
					ShowQuery(
 
						confirm_captions[vehtype],
 
						STR_DEPOT_SELL_CONFIRMATION_TEXT,
 
						this,
 
						DepotSellAllConfirmationCallback
 
					);
 
				}
 
				break;
 

	
 
			case DEPOT_WIDGET_VEHICLE_LIST:
 
				ShowVehicleListWindow(GetTileOwner(this->window_number), this->type, (TileIndex)this->window_number);
 
				break;
src/order_gui.cpp
Show inline comments
 
@@ -291,56 +291,56 @@ void DrawOrderString(const Vehicle *v, c
 
static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
 
{
 
	Order order;
 
	order.next  = NULL;
 
	order.index = 0;
 

	
 
	/* check depot first */
 
	if (_settings_game.order.gotodepot) {
 
		switch (GetTileType(tile)) {
 
			case MP_RAILWAY:
 
				if (v->type == VEH_TRAIN && IsTileOwner(tile, _local_company)) {
 
					if (IsRailDepot(tile)) {
 
						order.MakeGoToDepot(GetDepotByTile(tile)->index, ODTFB_PART_OF_ORDERS,
 
						order.MakeGoToDepot(Depot::GetByTile(tile)->index, ODTFB_PART_OF_ORDERS,
 
								_settings_client.gui.new_nonstop ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE);
 
						if (_ctrl_pressed) order.SetDepotOrderType((OrderDepotTypeFlags)(order.GetDepotOrderType() ^ ODTFB_SERVICE));
 
						return order;
 
					}
 
				}
 
				break;
 

	
 
			case MP_ROAD:
 
				if (IsRoadDepot(tile) && v->type == VEH_ROAD && IsTileOwner(tile, _local_company)) {
 
					order.MakeGoToDepot(GetDepotByTile(tile)->index, ODTFB_PART_OF_ORDERS,
 
					order.MakeGoToDepot(Depot::GetByTile(tile)->index, ODTFB_PART_OF_ORDERS,
 
							_settings_client.gui.new_nonstop ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE);
 
					if (_ctrl_pressed) order.SetDepotOrderType((OrderDepotTypeFlags)(order.GetDepotOrderType() ^ ODTFB_SERVICE));
 
					return order;
 
				}
 
				break;
 

	
 
			case MP_STATION:
 
				if (v->type != VEH_AIRCRAFT) break;
 
				if (IsHangar(tile) && IsTileOwner(tile, _local_company)) {
 
					order.MakeGoToDepot(GetStationIndex(tile), ODTFB_PART_OF_ORDERS, ONSF_STOP_EVERYWHERE);
 
					if (_ctrl_pressed) order.SetDepotOrderType((OrderDepotTypeFlags)(order.GetDepotOrderType() ^ ODTFB_SERVICE));
 
					return order;
 
				}
 
				break;
 

	
 
			case MP_WATER:
 
				if (v->type != VEH_SHIP) break;
 
				if (IsShipDepot(tile) && IsTileOwner(tile, _local_company)) {
 
					TileIndex tile2 = GetOtherShipDepotTile(tile);
 

	
 
					order.MakeGoToDepot(GetDepotByTile(tile < tile2 ? tile : tile2)->index, ODTFB_PART_OF_ORDERS, ONSF_STOP_EVERYWHERE);
 
					order.MakeGoToDepot(Depot::GetByTile(tile < tile2 ? tile : tile2)->index, ODTFB_PART_OF_ORDERS, ONSF_STOP_EVERYWHERE);
 
					if (_ctrl_pressed) order.SetDepotOrderType((OrderDepotTypeFlags)(order.GetDepotOrderType() ^ ODTFB_SERVICE));
 
					return order;
 
				}
 

	
 
			default:
 
				break;
 
		}
 
	}
 

	
 
	/* check waypoint */
 
	if (IsRailWaypointTile(tile) &&
 
			v->type == VEH_TRAIN &&
src/rail_cmd.cpp
Show inline comments
 
@@ -1432,25 +1432,25 @@ static CommandCost RemoveTrainDepot(Tile
 
	if (flags & DC_EXEC) {
 
		/* read variables before the depot is removed */
 
		DiagDirection dir = GetRailDepotDirection(tile);
 
		Owner owner = GetTileOwner(tile);
 
		Train *v = NULL;
 

	
 
		if (GetDepotWaypointReservation(tile)) {
 
			v = GetTrainForReservation(tile, DiagDirToDiagTrack(dir));
 
			if (v != NULL) FreeTrainTrackReservation(v);
 
		}
 

	
 
		DoClearSquare(tile);
 
		delete GetDepotByTile(tile);
 
		delete Depot::GetByTile(tile);
 
		AddSideToSignalBuffer(tile, dir, owner);
 
		YapfNotifyTrackLayoutChange(tile, DiagDirToDiagTrack(dir));
 
		if (v != NULL) TryPathReserve(v, true);
 
	}
 

	
 
	return CommandCost(EXPENSES_CONSTRUCTION, _price.remove_train_depot);
 
}
 

	
 
static CommandCost ClearTile_Track(TileIndex tile, DoCommandFlag flags)
 
{
 
	CommandCost cost(EXPENSES_CONSTRUCTION);
 
	CommandCost ret;
src/road_cmd.cpp
Show inline comments
 
@@ -873,25 +873,25 @@ CommandCost CmdBuildRoadDepot(TileIndex 
 
	}
 
	return cost.AddCost(_price.build_road_depot);
 
}
 

	
 
static CommandCost RemoveRoadDepot(TileIndex tile, DoCommandFlag flags)
 
{
 
	if (!CheckTileOwnership(tile) && _current_company != OWNER_WATER) return CMD_ERROR;
 

	
 
	if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
 
		DoClearSquare(tile);
 
		delete GetDepotByTile(tile);
 
		delete Depot::GetByTile(tile);
 
	}
 

	
 
	return CommandCost(EXPENSES_CONSTRUCTION, _price.remove_road_depot);
 
}
 

	
 
static CommandCost ClearTile_Road(TileIndex tile, DoCommandFlag flags)
 
{
 
	switch (GetRoadTileType(tile)) {
 
		case ROAD_TILE_NORMAL: {
 
			RoadBits b = GetAllRoadBits(tile);
 

	
 
			/* Clear the road if only one piece is on the tile OR we are not using the DC_AUTO flag */
src/roadveh_cmd.cpp
Show inline comments
 
@@ -365,40 +365,40 @@ static bool EnumRoadSignalFindDepot(Tile
 
static const Depot *FindClosestRoadDepot(const RoadVehicle *v)
 
{
 
	switch (_settings_game.pf.pathfinder_for_roadvehs) {
 
		case VPF_YAPF: // YAPF
 
			return YapfFindNearestRoadDepot(v);
 

	
 
		case VPF_NPF: { // NPF
 
			/* See where we are now */
 
			Trackdir trackdir = v->GetVehicleTrackdir();
 

	
 
			NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, v->tile, ReverseTrackdir(trackdir), false, TRANSPORT_ROAD, v->compatible_roadtypes, v->owner, INVALID_RAILTYPES, 0);
 

	
 
			if (ftd.best_bird_dist == 0) return GetDepotByTile(ftd.node.tile); // Target found
 
			if (ftd.best_bird_dist == 0) return Depot::GetByTile(ftd.node.tile); // Target found
 
		} break;
 

	
 
		default:
 
		case VPF_OPF: { // OPF
 
			RoadFindDepotData rfdd;
 

	
 
			rfdd.owner = v->owner;
 
			rfdd.best_length = UINT_MAX;
 

	
 
			/* search in all directions */
 
			for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) {
 
				FollowTrack(v->tile, PATHFIND_FLAGS_NONE, TRANSPORT_ROAD, v->compatible_roadtypes, d, EnumRoadSignalFindDepot, NULL, &rfdd);
 
			}
 

	
 
			if (rfdd.best_length != UINT_MAX) return GetDepotByTile(rfdd.tile);
 
			if (rfdd.best_length != UINT_MAX) return Depot::GetByTile(rfdd.tile);
 
		} break;
 
	}
 

	
 
	return NULL; // Target not found
 
}
 

	
 
bool RoadVehicle::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse)
 
{
 
	const Depot *depot = FindClosestRoadDepot(this);
 

	
 
	if (depot == NULL) return false;
 

	
src/ship_cmd.cpp
Show inline comments
 
@@ -91,25 +91,25 @@ SpriteID Ship::GetImage(Direction direct
 
		spritenum = Engine::Get(this->engine_type)->original_image_index;
 
	}
 

	
 
	return _ship_sprites[spritenum] + direction;
 
}
 

	
 
static const Depot *FindClosestShipDepot(const Vehicle *v)
 
{
 
	if (_settings_game.pf.pathfinder_for_ships == VPF_NPF) { // NPF is used
 
		Trackdir trackdir = v->GetVehicleTrackdir();
 
		NPFFoundTargetData ftd = NPFRouteToDepotTrialError(v->tile, trackdir, false, TRANSPORT_WATER, 0, v->owner, INVALID_RAILTYPES);
 

	
 
		if (ftd.best_bird_dist == 0) return GetDepotByTile(ftd.node.tile); // Found target
 
		if (ftd.best_bird_dist == 0) return Depot::GetByTile(ftd.node.tile); // Found target
 

	
 
		return NULL; // Did not find target
 
	}
 

	
 
	/* OPF or YAPF - find the closest depot */
 

	
 
	const Depot *depot;
 
	const Depot *best_depot = NULL;
 
	uint best_dist = UINT_MAX;
 

	
 
	FOR_ALL_DEPOTS(depot) {
 
		TileIndex tile = depot->xy;
src/train_cmd.cpp
Show inline comments
 
@@ -2222,25 +2222,25 @@ static TrainFindDepotData FindClosestTra
 
		} break;
 
	}
 

	
 
	return tfdd;
 
}
 

	
 
bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse)
 
{
 
	TrainFindDepotData tfdd = FindClosestTrainDepot(this, 0);
 
	if (tfdd.best_length == UINT_MAX) return false;
 

	
 
	if (location    != NULL) *location    = tfdd.tile;
 
	if (destination != NULL) *destination = GetDepotByTile(tfdd.tile)->index;
 
	if (destination != NULL) *destination = Depot::GetByTile(tfdd.tile)->index;
 
	if (reverse     != NULL) *reverse     = tfdd.reverse;
 

	
 
	return true;
 
}
 

	
 
/** Send a train to a depot
 
 * @param tile unused
 
 * @param flags type of operation
 
 * @param p1 train to send to the depot
 
 * @param p2 various bitmasked elements
 
 * - p2 bit 0-3 - DEPOT_ flags (see vehicle.h)
 
 * - p2 bit 8-10 - VLW flag (for mass goto depot)
 
@@ -4478,25 +4478,25 @@ static void CheckIfTrainNeedsService(Tra
 
	/* Only go to the depot if it is not too far out of our way. */
 
	if (tfdd.best_length == UINT_MAX || tfdd.best_length > MAX_ACCEPTABLE_DEPOT_DIST) {
 
		if (v->current_order.IsType(OT_GOTO_DEPOT)) {
 
			/* If we were already heading for a depot but it has
 
			 * suddenly moved farther away, we continue our normal
 
			 * schedule? */
 
			v->current_order.MakeDummy();
 
			InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
 
		}
 
		return;
 
	}
 

	
 
	const Depot *depot = GetDepotByTile(tfdd.tile);
 
	const Depot *depot = Depot::GetByTile(tfdd.tile);
 

	
 
	if (v->current_order.IsType(OT_GOTO_DEPOT) &&
 
			v->current_order.GetDestination() != depot->index &&
 
			!Chance16(3, 16)) {
 
		return;
 
	}
 

	
 
	v->current_order.MakeGoToDepot(depot->index, ODTFB_SERVICE);
 
	v->dest_tile = tfdd.tile;
 
	InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
 
}
 

	
src/vehicle_gui.cpp
Show inline comments
 
@@ -1234,25 +1234,25 @@ void ShowVehicleListWindow(const Vehicle
 
void ShowVehicleListWindow(CompanyID company, VehicleType vehicle_type, StationID station)
 
{
 
	ShowVehicleListWindowLocal(company, VLW_STATION_LIST, vehicle_type, station);
 
}
 

	
 
void ShowVehicleListWindow(CompanyID company, VehicleType vehicle_type, TileIndex depot_tile)
 
{
 
	uint16 depot_airport_index;
 

	
 
	if (vehicle_type == VEH_AIRCRAFT) {
 
		depot_airport_index = GetStationIndex(depot_tile);
 
	} else {
 
		Depot *depot = GetDepotByTile(depot_tile);
 
		Depot *depot = Depot::GetByTile(depot_tile);
 
		if (depot == NULL) return; // no depot to show
 
		depot_airport_index = depot->index;
 
	}
 
	ShowVehicleListWindowLocal(company, VLW_DEPOT_LIST, vehicle_type, depot_airport_index);
 
}
 

	
 

	
 
/* Unified vehicle GUI - Vehicle Details Window */
 

	
 
/** Constants of vehicle details widget indices */
 
enum VehicleDetailsWindowWidgets {
 
	VLD_WIDGET_CLOSEBOX = 0,
src/water_cmd.cpp
Show inline comments
 
@@ -168,25 +168,25 @@ static CommandCost RemoveShipDepot(TileI
 
	if (!IsShipDepot(tile)) return CMD_ERROR;
 
	if (!CheckTileOwnership(tile)) return CMD_ERROR;
 

	
 
	TileIndex tile2 = GetOtherShipDepotTile(tile);
 

	
 
	/* do not check for ship on tile when company goes bankrupt */
 
	if (!(flags & DC_BANKRUPT)) {
 
		if (!EnsureNoVehicleOnGround(tile) || !EnsureNoVehicleOnGround(tile2)) return CMD_ERROR;
 
	}
 

	
 
	if (flags & DC_EXEC) {
 
		/* Kill the depot, which is registered at the northernmost tile. Use that one */
 
		delete GetDepotByTile(tile2 < tile ? tile2 : tile);
 
		delete Depot::GetByTile(tile2 < tile ? tile2 : tile);
 

	
 
		MakeWaterKeepingClass(tile,  GetTileOwner(tile));
 
		MakeWaterKeepingClass(tile2, GetTileOwner(tile2));
 
		MarkTileDirtyByTile(tile);
 
		MarkTileDirtyByTile(tile2);
 
	}
 

	
 
	return CommandCost(EXPENSES_CONSTRUCTION, _price.remove_ship_depot);
 
}
 

	
 
/** build a shiplift */
 
static CommandCost DoBuildShiplift(TileIndex tile, DiagDirection dir, DoCommandFlag flags)
src/yapf/yapf_road.cpp
Show inline comments
 
@@ -394,25 +394,25 @@ public:
 
		/* set origin and destination nodes */
 
		Yapf().SetOrigin(tile, TrackdirToTrackdirBits(td));
 

	
 
		/* find the best path */
 
		bool bFound = Yapf().FindPath(v);
 
		if (!bFound) return false;
 

	
 
		/* some path found
 
		 * get found depot tile */
 
		Node *n = Yapf().GetBestNode();
 
		TileIndex depot_tile = n->m_segment_last_tile;
 
		assert(IsRoadDepotTile(depot_tile));
 
		Depot *ret = GetDepotByTile(depot_tile);
 
		Depot *ret = Depot::GetByTile(depot_tile);
 
		return ret;
 
	}
 
};
 

	
 
template <class Tpf_, class Tnode_list, template <class Types> class Tdestination>
 
struct CYapfRoad_TypesT
 
{
 
	typedef CYapfRoad_TypesT<Tpf_, Tnode_list, Tdestination>  Types;
 

	
 
	typedef Tpf_                              Tpf;
 
	typedef CFollowTrackRoad                  TrackFollower;
 
	typedef Tnode_list                        NodeList;
 
@@ -469,25 +469,25 @@ uint YapfRoadVehDistanceToTile(const Veh
 

	
 
Depot *YapfFindNearestRoadDepot(const Vehicle *v)
 
{
 
	TileIndex tile = v->tile;
 
	Trackdir trackdir = v->GetVehicleTrackdir();
 
	if ((TrackStatusToTrackdirBits(GetTileTrackStatus(tile, TRANSPORT_ROAD, RoadVehicle::From(v)->compatible_roadtypes)) & TrackdirToTrackdirBits(trackdir)) == 0) {
 
		return NULL;
 
	}
 

	
 
	/* handle the case when our vehicle is already in the depot tile */
 
	if (IsRoadDepotTile(tile)) {
 
		/* only what we need to return is the Depot* */
 
		return GetDepotByTile(tile);
 
		return Depot::GetByTile(tile);
 
	}
 

	
 
	/* default is YAPF type 2 */
 
	typedef Depot *(*PfnFindNearestDepot)(const Vehicle*, TileIndex, Trackdir);
 
	PfnFindNearestDepot pfnFindNearestDepot = &CYapfRoadAnyDepot2::stFindNearestDepot;
 

	
 
	/* check if non-default YAPF type should be used */
 
	if (_settings_game.pf.yapf.disable_node_optimization) {
 
		pfnFindNearestDepot = &CYapfRoadAnyDepot1::stFindNearestDepot; // Trackdir, allow 90-deg
 
	}
 

	
 
	Depot *ret = pfnFindNearestDepot(v, tile, trackdir);
0 comments (0 inline, 0 general)