summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-08-01 13:25:19 +0000
committersmatz <smatz@openttd.org>2008-08-01 13:25:19 +0000
commit7c0b1172e1e793d9674f5e69cf17c1f202b99369 (patch)
tree6d8d5b5c75139f0c08c865768f5f201093e766eb
parentc5a4e90338c4f66dfd75497b5137b4fd0a7da867 (diff)
downloadopenttd-7c0b1172e1e793d9674f5e69cf17c1f202b99369.tar.xz
(svn r13911) -Fix (r13806): do not consider crashed train as waiting at signal, v->direction doesn't have to match track anyway
-rw-r--r--src/train_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 8daa84d5e..431ff0de1 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -2972,8 +2972,8 @@ static void *CheckVehicleAtSignal(Vehicle *v, void *data)
{
DiagDirection exitdir = *(DiagDirection *)data;
- /* front engine of a train, not inside wormhole or depot */
- if (v->type == VEH_TRAIN && IsFrontEngine(v) && (v->u.rail.track & TRACK_BIT_MASK) != 0) {
+ /* front engine of a train, not inside wormhole or depot, not crashed */
+ if (v->type == VEH_TRAIN && IsFrontEngine(v) && (v->u.rail.track & TRACK_BIT_MASK) != 0 && !(v->vehstatus & VS_CRASHED)) {
if (v->cur_speed <= 5 && TrainExitDir(v->direction, v->u.rail.track) == exitdir) return v;
}