summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-02-02 22:13:13 +0000
committerrubidium <rubidium@openttd.org>2011-02-02 22:13:13 +0000
commit547421496ec06e77b1897d2ba8df2140bd073022 (patch)
treea125b2e843cc9adb551420f02976b5c6279372db /src/roadveh_cmd.cpp
parentbbe94dc4971cdf3db042173f67c9815dec2600a9 (diff)
downloadopenttd-547421496ec06e77b1897d2ba8df2140bd073022.tar.xz
(svn r21946) -Fix [FS#4447]: assertion/funny behaviour when a road vehicle reverses while overtaking, so abort the overtake attempt when reversing the road vehicle
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 825e9ac3f..b94bbbb9b 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1114,6 +1114,9 @@ static bool IndividualRoadVehicleController(RoadVehicle *v, const RoadVehicle *p
again:
uint start_frame = RVC_DEFAULT_START_FRAME;
if (IsReversingRoadTrackdir(dir)) {
+ /* When turning around we can't be overtaking. */
+ v->overtaking = 0;
+
/* Turning around */
if (v->roadtype == ROADTYPE_TRAM) {
/* Determine the road bits the tram needs to be able to turn around