1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix #13755. Regression causing entity position corruption (#13828)

When switching from variable frame to fixed frame the entity positions could become corrupted. This would cause to end up being stuck inside of tiles that they could not path out of. When switching from normal speed to hyperspeed the rendering switches from variable to fixed frame. Therefore entitys could end up corrupted when enabling hyperspeed. Due to the way the corruption occured a hang or crash could also occur.
This commit is contained in:
Duncan
2021-01-13 17:29:30 +00:00
committed by GitHub
parent 5c33773807
commit 0c91ed9bdd

View File

@@ -951,6 +951,12 @@ namespace OpenRCT2
{
_lastTick = 0;
_variableFrame = useVariableFrame;
// Switching from variable to fixed frame requires reseting
// of entity positions back to end of tick positions
auto& tweener = EntityTweener::Get();
tweener.Restore();
tweener.Reset();
}
if (useVariableFrame)