diff options
author | rubidium <rubidium@openttd.org> | 2008-08-02 22:56:21 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-08-02 22:56:21 +0000 |
commit | ed629f599bd39feead9ff16ff12b58e0285feac7 (patch) | |
tree | 29f7cbda13663586094a1e74190b8f952828f792 /src | |
parent | a32fb70e1dc48fcd62c6c038fc9399a1e7d2256f (diff) | |
download | openttd-ed629f599bd39feead9ff16ff12b58e0285feac7.tar.xz |
(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)
Diffstat (limited to 'src')
-rw-r--r-- | src/train_cmd.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index e237df907..3ce90a07f 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -3654,6 +3654,13 @@ static void TrainController(Vehicle *v, Vehicle *nomove, bool update_image) 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; } } else { |