From d26e40ca7e405ffbba533242a085d3bde5506cf1 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 5 Jun 2006 10:23:18 +0000 Subject: (svn r5118) Add IsRoadVehInDepot{Stopped,}() --- roadveh.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 roadveh.h (limited to 'roadveh.h') 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; +} -- cgit v1.2.3-54-g00ecf