mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
(svn r13962) -Codechange [YAPP]: Do not reverse in front of red signals when inside a PBS block and reversing of stuck trains is disabled. (michi_cc)
This commit is contained in:
parent
db637a2b7f
commit
5c9bb1bbd6
@ -3654,6 +3654,13 @@ static void TrainController(Vehicle *v, Vehicle *nomove, bool update_image)
|
|||||||
if (VehicleFromPos(o_tile, &exitdir, &CheckVehicleAtSignal) == NULL) return;
|
if (VehicleFromPos(o_tile, &exitdir, &CheckVehicleAtSignal) == NULL) return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If we would reverse but are currently in a PBS block and
|
||||||
|
* reversing of stuck trains is disabled, don't reverse. */
|
||||||
|
if (_settings_game.pf.wait_for_pbs_path == 255 && UpdateSignalsOnSegment(v->tile, enterdir, v->owner) == SIGSEG_PBS) {
|
||||||
|
v->load_unload_time_rem = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
goto reverse_train_direction;
|
goto reverse_train_direction;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user