summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2009-01-05 20:29:00 +0000
committermichi_cc <michi_cc@openttd.org>2009-01-05 20:29:00 +0000
commitc9d25e20f0e1bf93e5a28e788ac863529e362dc5 (patch)
tree6c0eacb1f6424929212970acf271de436ecb9df3
parentf9f9bb9c3cb2c671642c35bf1a69d9b119b441bc (diff)
downloadopenttd-c9d25e20f0e1bf93e5a28e788ac863529e362dc5.tar.xz
(svn r14851) -Fix: A train reversing in a non-PBS block can't be stuck.
-rw-r--r--src/train_cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index e71ef9e7b..ea4a80674 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1941,6 +1941,10 @@ static void ReverseTrainDirection(Vehicle *v)
/* Do not wait for a way out when we're still loading */
MarkTrainAsStuck(v);
}
+ } else if (HasBit(v->u.rail.flags, VRF_TRAIN_STUCK)) {
+ /* A train not inside a PBS block can't be stuck. */
+ ClrBit(v->u.rail.flags, VRF_TRAIN_STUCK);
+ v->load_unload_time_rem = 0;
}
}