diff options
author | rubidium <rubidium@openttd.org> | 2007-02-14 16:37:16 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-02-14 16:37:16 +0000 |
commit | a2999dadc91fd95fae93c3063d9db7c99245c7ad (patch) | |
tree | 1a15ba2c92fafbb76de3d76a96583953c41b088b /src/vehicle.cpp | |
parent | ca310e5a2684e8a3f905ba59219fc5c24c089f78 (diff) | |
download | openttd-a2999dadc91fd95fae93c3063d9db7c99245c7ad.tar.xz |
(svn r8735) -Feature: drive-through road stops made possible by the hard work of mart3p.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 68a2c0254..5197e6fc4 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2756,9 +2756,11 @@ Trackdir GetVehicleTrackdir(const Vehicle* v) 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 */ + if (IsStandardRoadStopTile(v->tile)) /* We'll assume the road vehicle is facing outwards */ return DiagdirToDiagTrackdir(GetRoadStopDir(v->tile)); /* Road vehicle in a station */ + if (IsDriveThroughStopTile(v->tile)) return DiagdirToDiagTrackdir(DirToDiagDir(v->direction)); + /* If vehicle's state is a valid track direction (vehicle is not turning around) return it */ if (!IsReversingRoadTrackdir((Trackdir)v->u.road.state)) return (Trackdir)v->u.road.state; |