mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user