summaryrefslogtreecommitdiff
path: root/roadveh.h
diff options
context:
space:
mode:
Diffstat (limited to 'roadveh.h')
-rw-r--r--roadveh.h15
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;
+}