diff options
author | rubidium <rubidium@openttd.org> | 2009-05-22 20:07:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-22 20:07:26 +0000 |
commit | c882248348510265e1926b0abc031b4c6fb0f97f (patch) | |
tree | e2e97af6a402e4babea7d19de728a50ead416f51 /src/vehicle_cmd.cpp | |
parent | ada30679605644a228be26850a76370fea723799 (diff) | |
download | openttd-c882248348510265e1926b0abc031b4c6fb0f97f.tar.xz |
(svn r16388) -Codechange: move u.air to Aircraft
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r-- | src/vehicle_cmd.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 5a78c747c..6dd38a346 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -10,6 +10,7 @@ #include "company_func.h" #include "vehicle_gui.h" #include "train.h" +#include "aircraft.h" #include "newgrf_engine.h" #include "newgrf_text.h" #include "functions.h" @@ -73,10 +74,11 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, case VEH_ROAD: break; - case VEH_AIRCRAFT: + case VEH_AIRCRAFT: { + Aircraft *a = (Aircraft *)v; /* cannot stop airplane when in flight, or when taking off / landing */ - if (v->u.air.state >= STARTTAKEOFF && v->u.air.state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT); - break; + if (a->state >= STARTTAKEOFF && a->state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT); + } break; default: return CMD_ERROR; } |