Merge branch 'signal_tunnels_bridges-sx' into jgrpp

This commit is contained in:
Jonathan G Rennison
2015-10-31 01:31:48 +00:00
2 changed files with 8 additions and 3 deletions

View File

@@ -3324,6 +3324,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;
}
@@ -3565,6 +3566,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)) {
@@ -3653,6 +3655,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*/