From 1fcd69096ced02e2adc10b545d65b3ed73e1eb3c Mon Sep 17 00:00:00 2001 From: Rubidium Date: Mon, 13 Mar 2023 22:09:14 +0100 Subject: [PATCH] Fix: do not update a RV's Z-position when stationary while turning When the direction of a RV changes the Z-position update logic was called, which did nothing to the Z-position because that is only changed every other step. By chance/luck this never triggered with RV's turning around, until making the partial Z calculations consistent and moving the locations where the Z-position is changed, causing the Z-position to be changed twice for the RV that stayed at the same location. --- src/roadveh_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 5067c9176e..68059ed0d5 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1473,7 +1473,7 @@ again: * A vehicle has to spend at least 9 frames on a tile, so the following articulated part can follow. * (The following part may only be one tile behind, and the front part is moved before the following ones.) * The short (inner) curve has 8 frames, this elongates it to 10. */ - v->UpdateInclination(false, true); + v->UpdateViewport(true, true); return true; }