diff options
author | yexo <yexo@openttd.org> | 2010-03-19 09:48:44 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-03-19 09:48:44 +0000 |
commit | 414071d07f787042364fec573030720ba664154e (patch) | |
tree | 57593a3df5182caf905c03c7f99b0ac8802048ce /src/order_cmd.cpp | |
parent | 81ca0e28c4504bbc7828df50b2086bbdb8776dd1 (diff) | |
download | openttd-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.cpp | 2 |
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 { |