mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r11571) -Fix [FS#1493]: road vehicle getting to the wrong side of a station when trying to overtake in there.
This commit is contained in:
parent
ddc8f2d16f
commit
02c46026b3
|
@ -1491,7 +1491,10 @@ static bool IndividualRoadVehicleController(Vehicle *v, const Vehicle *prev)
|
||||||
uint32 r;
|
uint32 r;
|
||||||
|
|
||||||
if (v->u.road.overtaking != 0) {
|
if (v->u.road.overtaking != 0) {
|
||||||
if (++v->u.road.overtaking_ctr >= 35)
|
if (IsTileType(v->tile, MP_STATION)) {
|
||||||
|
/* Force us to be not overtaking! */
|
||||||
|
v->u.road.overtaking = 0;
|
||||||
|
} else if (++v->u.road.overtaking_ctr >= 35) {
|
||||||
/* If overtaking just aborts at a random moment, we can have a out-of-bound problem,
|
/* If overtaking just aborts at a random moment, we can have a out-of-bound problem,
|
||||||
* if the vehicle started a corner. To protect that, only allow an abort of
|
* if the vehicle started a corner. To protect that, only allow an abort of
|
||||||
* overtake if we are on straight roads */
|
* overtake if we are on straight roads */
|
||||||
|
@ -1499,6 +1502,7 @@ static bool IndividualRoadVehicleController(Vehicle *v, const Vehicle *prev)
|
||||||
v->u.road.overtaking = 0;
|
v->u.road.overtaking = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* If this vehicle is in a depot and we've reached this point it must be
|
/* If this vehicle is in a depot and we've reached this point it must be
|
||||||
* one of the articulated parts. It will stay in the depot until activated
|
* one of the articulated parts. It will stay in the depot until activated
|
||||||
|
|
Loading…
Reference in New Issue