changeset 17207:96ef7a5b4f3a draft

(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
author rubidium <rubidium@openttd.org>
date Wed, 02 Feb 2011 22:13:13 +0000
parents ef0239862056
children 464eb74cd181
files src/roadveh_cmd.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1114,6 +1114,9 @@
 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