From b79f6ac808e71f7ee1fed5cbe46ce718491fc51c Mon Sep 17 00:00:00 2001 From: fredzio Date: Sun, 6 Dec 2020 13:20:37 +0100 Subject: [PATCH] Force reset position of actor after snapping to the ground. Otherwise the interpolation calculation would kick in and make the actor goes upward if the spawn point is higher than summoner or downward if lower. The actor would then either jump or fall through terrain. --- apps/openmw/mwworld/worldimp.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 224925dd55..05051f3003 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1351,6 +1351,8 @@ namespace MWWorld } moveObject(ptr, ptr.getCell(), pos.x(), pos.y(), pos.z()); + if (force) // force physics to use the new position + mPhysics->getActor(ptr)->resetPosition(); } void World::fixPosition()