(svn r13911) -Fix (r13806): do not consider crashed train as waiting at signal, v->direction doesn't have to match track anyway

This commit is contained in:
smatz 2008-08-01 13:25:19 +00:00
parent c5a4e90338
commit 7c0b1172e1
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}