From bccdefd63fbe47018df9d0e55ca46c748fda7d96 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Mon, 1 Aug 2022 07:46:18 +0300 Subject: [PATCH] Discard momentum upon teleportation (bug #6545) --- CHANGELOG.md | 1 + apps/openmw/mwphysics/physicssystem.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 168d03310a..b71b6e5452 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -118,6 +118,7 @@ Bug #6519: Effects tooltips for ingredients work incorrectly Bug #6523: Disintegrate Weapon is resisted by Resist Magicka instead of Sanctuary Bug #6544: Far from world origin objects jitter when camera is still + Bug #6545: Player character momentum is preserved when going to a different cell Bug #6559: Weapon condition inconsistency between melee and ranged critical / sneak / KO attacks Bug #6579: OpenMW compilation error when using OSG doubles for BoundingSphere Bug #6606: Quests with multiple IDs cannot always be restarted diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp index f4718e0d8f..c2fb47186f 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -699,7 +699,10 @@ namespace MWPhysics void PhysicsSystem::clearQueuedMovement() { for (const auto& [_, actor] : mActors) + { actor->setVelocity(osg::Vec3f()); + actor->setInertialForce(osg::Vec3f()); + } } std::vector PhysicsSystem::prepareSimulation(bool willSimulate)