From 3c4a5d619258a45b66e149b9c9a5718f78ee0dcd Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 5 Jun 2006 11:28:31 +0000 Subject: [PATCH] (svn r5121) Add forgotten file in r5120 --- ship.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ship.h diff --git a/ship.h b/ship.h new file mode 100644 index 0000000000..271ae7f085 --- /dev/null +++ b/ship.h @@ -0,0 +1,15 @@ +/* $Id$ */ + +#include "vehicle.h" + + +static inline bool IsShipInDepot(const Vehicle* v) +{ + assert(v->type == VEH_Ship); + return v->u.ship.state == 0x80; +} + +static inline bool IsShipInDepotStopped(const Vehicle* v) +{ + return IsShipInDepot(v) && v->vehstatus & VS_STOPPED; +}