summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-05 10:23:18 +0000
committertron <tron@openttd.org>2006-06-05 10:23:18 +0000
commitd26e40ca7e405ffbba533242a085d3bde5506cf1 (patch)
tree35c744c702db39785503087f611946cf4470097d /vehicle.c
parent5dd68173c812e645cc3c2f15c6aeb6f2e35f3296 (diff)
downloadopenttd-d26e40ca7e405ffbba533242a085d3bde5506cf1.tar.xz
(svn r5118) Add IsRoadVehInDepot{Stopped,}()
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c3
1 files changed, 2 insertions, 1 deletions
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 */