Skip to content

Commit

Permalink
Fix: do not update a RV's Z-position when stationary while turning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rubidium42 authored and pull[bot] committed Aug 13, 2023
1 parent 10a349a commit 7733682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/roadveh_cmd.cpp
Expand Up @@ -1473,7 +1473,7 @@ bool IndividualRoadVehicleController(RoadVehicle *v, const RoadVehicle *prev)
* 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;
}

Expand Down

0 comments on commit 7733682

Please sign in to comment.