diff options
author | tron <tron@openttd.org> | 2006-06-05 10:23:18 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-05 10:23:18 +0000 |
commit | eeeb8172e80eedf59109dced55fe72775340b59d (patch) | |
tree | 35c744c702db39785503087f611946cf4470097d /roadveh.h | |
parent | ddbcd9007c19f535bc4aca7cf01afed05a7b0b3f (diff) | |
download | openttd-eeeb8172e80eedf59109dced55fe72775340b59d.tar.xz |
(svn r5118) Add IsRoadVehInDepot{Stopped,}()
Diffstat (limited to 'roadveh.h')
-rw-r--r-- | roadveh.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/roadveh.h b/roadveh.h new file mode 100644 index 000000000..9d5800e6d --- /dev/null +++ b/roadveh.h @@ -0,0 +1,15 @@ +/* $Id$ */ + +#include "vehicle.h" + + +static inline bool IsRoadVehInDepot(const Vehicle* v) +{ + assert(v->type == VEH_Road); + return v->u.road.state == 254; +} + +static inline bool IsRoadVehInDepotStopped(const Vehicle* v) +{ + return IsRoadVehInDepot(v) && v->vehstatus & VS_STOPPED; +} |