summaryrefslogtreecommitdiff
path: root/src/order_cmd.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-19 09:48:44 +0000
committeryexo <yexo@openttd.org>2010-03-19 09:48:44 +0000
commit414071d07f787042364fec573030720ba664154e (patch)
tree57593a3df5182caf905c03c7f99b0ac8802048ce /src/order_cmd.cpp
parent81ca0e28c4504bbc7828df50b2086bbdb8776dd1 (diff)
downloadopenttd-414071d07f787042364fec573030720ba664154e.tar.xz
(svn r19463) -Codechange: add helper function to determine if an airport has at least one hangar
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r--src/order_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 953a9d980..4d7487185 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -535,7 +535,7 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
ret.SetGlobalErrorMessage();
if (ret.Failed()) return ret;
- if (!CanVehicleUseStation(v, st) || st->airport.GetSpec()->nof_depots == 0) {
+ if (!CanVehicleUseStation(v, st) || !st->airport.HasHangar()) {
return CMD_ERROR;
}
} else {