From 943d9d97dc241d0470b91fced648183bfccf85c4 Mon Sep 17 00:00:00 2001 From: Daniel Pettersson Date: Fri, 10 Jun 2016 15:22:12 +0200 Subject: [PATCH] Slowfall now stops momentum when jumping --- apps/openmw/mwphysics/physicssystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp index 3b9917198..d1dca5f3f 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -448,6 +448,10 @@ namespace MWPhysics inertia.z() += time * -627.2f; if (inertia.z() < 0) inertia.z() *= slowFall; + if (slowFall < 1.f) { + inertia.x() = 0; + inertia.y() = 0; + } physicActor->setInertialForce(inertia); } physicActor->setOnGround(isOnGround);