summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy <andy@teamrubber.com>2019-01-09 17:37:58 +0000
committerIngo von Borstel <github@planetmaker.de>2019-01-09 18:37:58 +0100
commite934f09f02a022c7ef3d54879ce6c07454c098a6 (patch)
treec7fd9230567f61ab4b69ec8b802c27fc51b4c2a1 /src
parent5e51d9ee823af27d00f88ef38ea4753e249e296c (diff)
downloadopenttd-e934f09f02a022c7ef3d54879ce6c07454c098a6.tar.xz
Fix: Don't increase motion counter while train is waiting at non-path signals (Author: frosch123) #5877 (#7018)
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 0672ac209..c8387d0a9 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3187,12 +3187,12 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
if (!HasSignalOnTrackdir(gp.new_tile, ReverseTrackdir(i))) {
v->cur_speed = 0;
v->subspeed = 0;
- v->progress = 255 - 100;
+ 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;
} else if (HasSignalOnTrackdir(gp.new_tile, i)) {
v->cur_speed = 0;
v->subspeed = 0;
- v->progress = 255 - 10;
+ 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) {
DiagDirection exitdir = TrackdirToExitdir(i);
TileIndex o_tile = TileAddByDiagDir(gp.new_tile, exitdir);