From 2283ce3a2b33c37b2652a5d1b25359911ac7f538 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 19 Aug 2021 01:39:29 +0100 Subject: [PATCH] ATC: Reduce lower limit of nominal look-ahead distance for speed timers See: #310 --- src/train_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index fa972d3932..f0ec422853 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -100,7 +100,7 @@ static bool CheckTrainStayInWormHolePathReserve(Train *t, TileIndex tile); static DateTicksScaled GetSpeedRestrictionTimeout(const Train *t) { const int64 velocity = std::max(25, t->cur_speed); - const int64 look_ahead_distance = Clamp(t->cur_speed / 8, 6, 16); // In tiles, varying between 6 and 16 depending on current speed + const int64 look_ahead_distance = Clamp(t->cur_speed / 8, 4, 16); // In tiles, varying between 4 and 16 depending on current speed // This assumes travel along the X or Y map axis, not diagonally. See GetAdvanceDistance, GetAdvanceSpeed. const int64 ticks_per_tile = (192 * 16 * 4 / 3) / velocity;