summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2019-02-19 22:02:05 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-02-21 23:19:03 +0000
commit690d1dd6a4490821759a6025114e0dc3eb656293 (patch)
treeb5247860cdb77d2bb646c187069fb1735fa00e7d /src
parent456e67ac1c52431f9b7ae4d15f8188b94b2daea6 (diff)
downloadopenttd-690d1dd6a4490821759a6025114e0dc3eb656293.tar.xz
Fix #7159, e934f09: Waiting time at red one-way signals was too short.
This is not an exact fix as previously, the wait time was speed/acceleration dependant. This simple fix ignores that and just makes the 'days' from the settings comment to be actually days.
Diffstat (limited to 'src')
-rw-r--r--src/train_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index c4deedde8..29b2e543e 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3186,12 +3186,12 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 255; // make sure that every bit of acceleration will hit the signal again, so speed stays 0.
- if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_oneway_signal * 20) return false;
+ if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_oneway_signal * DAY_TICKS * 2) return false;
} else if (HasSignalOnTrackdir(gp.new_tile, i)) {
v->cur_speed = 0;
v->subspeed = 0;
v->progress = 255; // make sure that every bit of acceleration will hit the signal again, so speed stays 0.
- if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_twoway_signal * 73) {
+ if (!_settings_game.pf.reverse_at_signals || ++v->wait_counter < _settings_game.pf.wait_twoway_signal * DAY_TICKS * 2) {
DiagDirection exitdir = TrackdirToExitdir(i);
TileIndex o_tile = TileAddByDiagDir(gp.new_tile, exitdir);