Changeset - r27057:50ced223db64
[Not reviewed]
master
0 1 0
Rubidium - 21 months ago 2023-03-13 21:09:14
rubidium@openttd.org
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.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/roadveh_cmd.cpp
Show inline comments
 
@@ -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;
 
	}
 

	
0 comments (0 inline, 0 general)