From 6bdc2b2b0615952ee25de4f5bb6a34ad87844444 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Mon, 26 Jul 2021 08:50:19 +0200 Subject: [PATCH] [Client] Fix rotation sync --- apps/openmw/mwmechanics/character.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index d4df471e7..068929ce6 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2127,9 +2127,6 @@ void CharacterController::update(float duration) movementSettings.mPosition[2] = onground ? 1 : 0; } - osg::Vec3f rot = cls.getRotationVector(mPtr); - osg::Vec3f vec(movementSettings.asVec3()); - /* Start of tes3mp addition @@ -2162,6 +2159,9 @@ void CharacterController::update(float duration) End of tes3mp addition */ + osg::Vec3f rot = cls.getRotationVector(mPtr); + osg::Vec3f vec(movementSettings.asVec3()); + movementSettings.mSpeedFactor = std::min(vec.length(), 1.f); vec.normalize();