summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-12-29 23:13:36 +0000
committeryexo <yexo@openttd.org>2009-12-29 23:13:36 +0000
commit1520aab5b2da0d9c33d983dac6f967f007ef2d7f (patch)
tree8c730043a502a9ec6c1352a26e403158b87ebbf5 /src
parent5b896198e5e8e083d3fbcb2ae09793585eb9f0fe (diff)
downloadopenttd-1520aab5b2da0d9c33d983dac6f967f007ef2d7f.tar.xz
(svn r18660) -Cleanup: remove useless function
Diffstat (limited to 'src')
-rw-r--r--src/order_cmd.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index a07b2ac89..bd675b755 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1415,20 +1415,6 @@ CommandCost CmdRestoreOrderIndex(TileIndex tile, DoCommandFlag flags, uint32 p1,
}
-static TileIndex GetStationTileForVehicle(const Vehicle *v, const Station *st)
-{
- if (!CanVehicleUseStation(v, st)) return INVALID_TILE;
-
- switch (v->type) {
- default: NOT_REACHED();
- case VEH_TRAIN: return st->train_station.tile;
- case VEH_AIRCRAFT: return st->airport_tile;
- case VEH_SHIP: return st->dock_tile;
- case VEH_ROAD: return st->GetPrimaryRoadStop(RoadVehicle::From(v))->xy;
- }
-}
-
-
/**
*
* Check the orders of a vehicle, to see if there are invalid orders and stuff
@@ -1467,10 +1453,9 @@ void CheckOrders(const Vehicle *v)
/* Does station have a load-bay for this vehicle? */
if (order->IsType(OT_GOTO_STATION)) {
const Station *st = Station::Get(order->GetDestination());
- TileIndex required_tile = GetStationTileForVehicle(v, st);
n_st++;
- if (required_tile == INVALID_TILE) problem_type = 3;
+ if (!CanVehicleUseStation(v, st)) problem_type = 3;
}
}