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

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
smatz 16 years ago
parent c5a4e90338
commit 7c0b1172e1

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

Loading…
Cancel
Save