(svn r8730) -Codechange: more replacements of magic numbers by enums and removal of some (by now) redundant comments.

This commit is contained in:
rubidium
2007-02-14 10:33:36 +00:00
parent 3789e314d9
commit 447b16930e
3 changed files with 38 additions and 44 deletions

View File

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