summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-04 21:53:09 +0000
committerrubidium <rubidium@openttd.org>2007-12-04 21:53:09 +0000
commit02c46026b399dd453857fb42a38139bc95b200f9 (patch)
tree9b403e9a203945d48606d70bb5570072966aa31b
parentddc8f2d16faa652a76da1400471704e147589ca7 (diff)
downloadopenttd-02c46026b399dd453857fb42a38139bc95b200f9.tar.xz
(svn r11571) -Fix [FS#1493]: road vehicle getting to the wrong side of a station when trying to overtake in there.
-rw-r--r--src/roadveh_cmd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index f19558a78..cb9fa2adb 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1491,13 +1491,17 @@ static bool IndividualRoadVehicleController(Vehicle *v, const Vehicle *prev)
uint32 r;
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 the vehicle started a corner. To protect that, only allow an abort of
* overtake if we are on straight roads */
if (v->u.road.state < RVSB_IN_ROAD_STOP && IsStraightRoadTrackdir((Trackdir)v->u.road.state)) {
v->u.road.overtaking = 0;
}
+ }
}
/* If this vehicle is in a depot and we've reached this point it must be