summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-08 22:24:21 +0000
committerrubidium <rubidium@openttd.org>2013-11-08 22:24:21 +0000
commit169bf3a403883471cd74f52b416085af96fc5097 (patch)
tree1040becd7775a0e515192646f72022cfd1291c88 /src
parent1ffcdbd515667baee080a335bb8a2fd6825bd07e (diff)
downloadopenttd-169bf3a403883471cd74f52b416085af96fc5097.tar.xz
(svn r25955) -Fix [FS#5723]: Train's "force proceed" status gets reset when the track on the other side of the tile has a signal (adf88)
Diffstat (limited to 'src')
-rw-r--r--src/train_cmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 038649862..a35b39c81 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3149,8 +3149,9 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
* this to one, then if we reach the next signal it is
* decreased to zero and we won't pass that new signal. */
Trackdir dir = FindFirstTrackdir(trackdirbits);
- if (GetSignalType(gp.new_tile, TrackdirToTrack(dir)) != SIGTYPE_PBS ||
- !HasSignalOnTrackdir(gp.new_tile, ReverseTrackdir(dir))) {
+ if (HasSignalOnTrackdir(gp.new_tile, dir) ||
+ (HasSignalOnTrackdir(gp.new_tile, ReverseTrackdir(dir)) &&
+ GetSignalType(gp.new_tile, TrackdirToTrack(dir)) != SIGTYPE_PBS)) {
/* However, we do not want to be stopped by PBS signals
* entered via the back. */
v->force_proceed = (v->force_proceed == TFP_SIGNAL) ? TFP_STUCK : TFP_NONE;