Fix reversing behind waypoint/signal in bridges/tunnels

This commit is contained in:
Jonathan G Rennison
2021-01-02 12:09:29 +00:00
parent 13ff4f72ba
commit f2c492c351

View File

@@ -4463,6 +4463,9 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
v->y_pos = gp.y; v->y_pos = gp.y;
v->UpdatePosition(); v->UpdatePosition();
v->UpdateDeltaXY(); v->UpdateDeltaXY();
if (v->reverse_distance > 1) {
v->reverse_distance--;
}
if (HasBit(v->gv_flags, GVF_CHUNNEL_BIT)) { if (HasBit(v->gv_flags, GVF_CHUNNEL_BIT)) {
/* update the Z position of the vehicle */ /* update the Z position of the vehicle */
int old_z = v->UpdateInclination(false, false, true); int old_z = v->UpdateInclination(false, false, true);