From e37e5d4d16fd3240bd57355df40abc889e3ce8db Mon Sep 17 00:00:00 2001 From: fredzio Date: Mon, 18 Jan 2021 17:42:03 +0100 Subject: [PATCH] Don't run unstuck if there is no simulation running in async case. In this case, the actor mPreviousPosition is not updated, so the actor position is interpolated between an old (stucked) position and the new (unstucked) position. The new position is most likely "stucked", so the unstuck code strikes again, making the actor "vibrates". That's exactly what the sync code path does, and it doesn't exhibit this behavior. --- apps/openmw/mwphysics/mtphysics.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw/mwphysics/mtphysics.cpp b/apps/openmw/mwphysics/mtphysics.cpp index 2781a5b1bc..6c7c573a49 100644 --- a/apps/openmw/mwphysics/mtphysics.cpp +++ b/apps/openmw/mwphysics/mtphysics.cpp @@ -173,6 +173,8 @@ namespace MWPhysics { if (mDeferAabbUpdate) updateAabbs(); + if (!mRemainingSteps) + return; for (auto& data : mActorsFrameData) if (data.mActor.lock()) {