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 | 098e54f7d9905b5d33f0e13a9a9d6209d5dfea50 (patch) | |
tree | 71115f6bacc228220f52537dbab8c6154497e86a /aircraft.h | |
parent | 6d135c110002729acd0800fa4ffe6750a3132f27 (diff) | |
download | openttd-098e54f7d9905b5d33f0e13a9a9d6209d5dfea50.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; +} |