summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-10 09:51:14 +0000
committerrubidium <rubidium@openttd.org>2009-01-10 09:51:14 +0000
commit0543f50181fcdaa5c4f1365c2dfefc65649175a9 (patch)
treec150281da19ec8c75bcae7d7526de3017ee154db /src/aircraft_cmd.cpp
parent5f53496e54f3080b1c1c1c000d47f914fb3e6f10 (diff)
downloadopenttd-0543f50181fcdaa5c4f1365c2dfefc65649175a9.tar.xz
(svn r14952) -Codechange: unify the "can vehicle go to station" tests
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index bf05fb952..8a1c8470f 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -273,7 +273,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
if (!IsHangarTile(tile) || !IsTileOwner(tile, _current_company)) return CMD_ERROR;
/* Prevent building aircraft types at places which can't handle them */
- if (!CanAircraftUseStation(p1, tile)) return CMD_ERROR;
+ if (!CanVehicleUseStation(p1, GetStationByTile(tile))) return CMD_ERROR;
/* Allocate 2 or 3 vehicle structs, depending on type
* vl[0] = aircraft, vl[1] = shadow, [vl[2] = rotor] */