(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

This commit is contained in:
rubidium 2011-02-02 22:13:13 +00:00
parent bbe94dc497
commit 547421496e
1 changed files with 3 additions and 0 deletions

View File

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