Mercurial > hg > openttd
diff src/train_cmd.cpp @ 9820:7ad7c8e6ca13 draft
(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)
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 02 Aug 2008 22:56:21 +0000 (2008-08-02) |
parents | ec8a4c799a44 |
children | 2b151a3dc570 |
line wrap: on
line diff
--- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -3654,6 +3654,13 @@ 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 {