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,}() --- vehicle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vehicle.c') diff --git a/vehicle.c b/vehicle.c index 40bc6ac41..f6a89bc3d 100644 --- a/vehicle.c +++ b/vehicle.c @@ -3,6 +3,7 @@ #include "stdafx.h" #include "openttd.h" #include "road_map.h" +#include "roadveh.h" #include "spritecache.h" #include "table/sprites.h" #include "table/strings.h" @@ -1996,7 +1997,7 @@ Trackdir GetVehicleTrackdir(const Vehicle* v) return TrackDirectionToTrackdir(FIND_FIRST_BIT(v->u.ship.state),v->direction); case VEH_Road: - if (v->u.road.state == 254) /* We'll assume the road vehicle is facing outwards */ + if (IsRoadVehInDepot(v)) /* We'll assume the road vehicle is facing outwards */ return DiagdirToDiagTrackdir(GetRoadDepotDirection(v->tile)); if (IsRoadStopTile(v->tile)) /* We'll assume the road vehicle is facing outwards */ -- cgit v1.2.3-54-g00ecf