summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-14 10:33:36 +0000
committerrubidium <rubidium@openttd.org>2007-02-14 10:33:36 +0000
commit447b16930e7b03304ca72d0ec3dd240c7a44dc5d (patch)
treec07923e0460c7e079218104151328efd571ed988 /src/vehicle.cpp
parent3789e314d9a3cfdbd4e875b08334b5a419fd45c7 (diff)
downloadopenttd-447b16930e7b03304ca72d0ec3dd240c7a44dc5d.tar.xz
(svn r8730) -Codechange: more replacements of magic numbers by enums and removal of some (by now) redundant comments.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 6e373a971..68a2c0254 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2760,7 +2760,7 @@ Trackdir GetVehicleTrackdir(const Vehicle* v)
return DiagdirToDiagTrackdir(GetRoadStopDir(v->tile)); /* Road vehicle in a station */
/* If vehicle's state is a valid track direction (vehicle is not turning around) return it */
- if ((v->u.road.state & 7) < 6) return (Trackdir)v->u.road.state;
+ if (!IsReversingRoadTrackdir((Trackdir)v->u.road.state)) return (Trackdir)v->u.road.state;
/* Vehicle is turning around, get the direction from vehicle's direction */
return DiagdirToDiagTrackdir(DirToDiagDir(v->direction));