(svn r5118) Add IsRoadVehInDepot{Stopped,}()

This commit is contained in:
tron
2006-06-05 10:23:18 +00:00
parent ddbcd9007c
commit eeeb8172e8
4 changed files with 28 additions and 10 deletions

15
roadveh.h Normal file
View File

@@ -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;
}