Fix vehicles emitting smoke when stopped at a bridge signal.

This commit is contained in:
Jonathan G Rennison 2015-10-31 01:31:06 +00:00
parent 654afdc113
commit 4759019cf5

View File

@ -3195,6 +3195,7 @@ static bool CheckTrainStayInWormHole(Train *t, TileIndex tile)
}
SigSegState seg_state = _settings_game.pf.reserve_paths ? SIGSEG_PBS : UpdateSignalsOnSegment(tile, INVALID_DIAGDIR, t->owner);
if (seg_state == SIGSEG_FULL || (seg_state == SIGSEG_PBS && !TryPathReserve(t))) {
t->vehstatus |= VS_TRAIN_SLOWING;
t->cur_speed = 0;
return true;
}
@ -3415,6 +3416,7 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
if (v->IsFrontEngine() && v->force_proceed == 0) {
if (IsTunnelBridgeWithSignRed(gp.new_tile)) {
v->cur_speed = 0;
v->vehstatus |= VS_TRAIN_SLOWING;
return false;
}
if (IsTunnelBridgeExit(gp.new_tile)) {
@ -3503,6 +3505,7 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
if (IsToCloseBehindTrain(v, gp.new_tile, distance == 0)) {
if (distance == 0) v->wait_counter = 0;
v->cur_speed = 0;
v->vehstatus |= VS_TRAIN_SLOWING;
return false;
}
/* flip signal in front to red on bridges*/