From f2c492c3514ff724320223b73142317da9a3f1ae Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 2 Jan 2021 12:09:29 +0000 Subject: [PATCH] Fix reversing behind waypoint/signal in bridges/tunnels --- src/train_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 907affecf9..5f37226135 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -4463,6 +4463,9 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse) v->y_pos = gp.y; v->UpdatePosition(); v->UpdateDeltaXY(); + if (v->reverse_distance > 1) { + v->reverse_distance--; + } if (HasBit(v->gv_flags, GVF_CHUNNEL_BIT)) { /* update the Z position of the vehicle */ int old_z = v->UpdateInclination(false, false, true);