diff options
author | tron <tron@openttd.org> | 2006-06-05 12:43:41 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-05 12:43:41 +0000 |
commit | 00aa407edd3e6c85b7bc667cfd7a1a70d65c4f28 (patch) | |
tree | 71115f6bacc228220f52537dbab8c6154497e86a /aircraft.h | |
parent | 3c4a5d619258a45b66e149b9c9a5718f78ee0dcd (diff) | |
download | openttd-00aa407edd3e6c85b7bc667cfd7a1a70d65c4f28.tar.xz |
(svn r5124) Add IsAircraftInHangar{Stopped,}(), which supersedes CheckStoppedInHangar()
-Fix: Be more strict what it means for an aircraft to be in a hangar: It's not just being stopped on a hangar tile
Diffstat (limited to 'aircraft.h')
-rw-r--r-- | aircraft.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/aircraft.h b/aircraft.h new file mode 100644 index 000000000..55fc35c89 --- /dev/null +++ b/aircraft.h @@ -0,0 +1,16 @@ +/* $Id$ */ + +#include "station_map.h" +#include "vehicle.h" + + +static inline bool IsAircraftInHangar(const Vehicle* v) +{ + assert(v->type == VEH_Aircraft); + return v->vehstatus & VS_HIDDEN && IsHangarTile(v->tile); +} + +static inline bool IsAircraftInHangarStopped(const Vehicle* v) +{ + return IsAircraftInHangar(v) && v->vehstatus & VS_STOPPED; +} |