Files @ r5595:baebc9e54b71
Branch filter:

Location: cpp/openttd-patchpack/source/src/roadveh.h

Darkvater
(svn r8049) -Regression (r7369): Removing certain news windows could cause a crash due to only
one MoveToNextItem() in DeleteVehicleNews (added in r3757). To work correctly do not
reset _forced_news to INVALID_NEWS when a new item is added, but leave it.
-Codechange: ShowLastNewsMessage has been changed so that it actually works, wraps
around correctly (array as FIFO) and shows the previous news item if the current
news item is open (previously this was doubly shown).
/* $Id$ */

#ifndef ROADVEH_H
#define ROADVEH_H

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

void CcCloneRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2);

#endif /* ROADVEH_H */