diff options
author | smatz <smatz@openttd.org> | 2009-06-24 17:39:54 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-24 17:39:54 +0000 |
commit | 8343340acb5bdb40555e04f40aac567d6e583bb8 (patch) | |
tree | 29b17ad863977abd3d3417dd8bbf84e01cfc261d /src/aircraft_cmd.cpp | |
parent | b18bf87c9081c3d202897e9c3ed282729db415a4 (diff) | |
download | openttd-8343340acb5bdb40555e04f40aac567d6e583bb8.tar.xz |
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index c9264d165..e11bdd753 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -28,6 +28,7 @@ #include "company_func.h" #include "effectvehicle_func.h" #include "settings_type.h" +#include "station_base.h" #include "table/strings.h" #include "table/sprites.h" @@ -262,7 +263,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin if (!IsHangarTile(tile) || !IsTileOwner(tile, _current_company)) return CMD_ERROR; /* Prevent building aircraft types at places which can't handle them */ - if (!CanVehicleUseStation(p1, GetStationByTile(tile))) return CMD_ERROR; + if (!CanVehicleUseStation(p1, Station::GetByTile(tile))) return CMD_ERROR; /* We will need to allocate 2 or 3 vehicle structs, depending on type */ if (!Vehicle::CanAllocateItem(avi->subtype & AIR_CTOL ? 2 : 3)) { @@ -343,7 +344,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin * layout for #th position of depot. Since layout must start with a listing * of all depots, it is simple */ for (uint i = 0;; i++) { - const Station *st = GetStationByTile(tile); + const Station *st = Station::GetByTile(tile); const AirportFTAClass *apc = st->Airport(); assert(i != apc->nof_depots); |