From 32cc14981eb4fafcb1396edf62d83aa6da0aaf02 Mon Sep 17 00:00:00 2001 From: Alexei Dobrohotov Date: Tue, 22 Dec 2020 20:40:52 +0300 Subject: [PATCH] Don't move characters if their animation can't move them --- apps/openmw/mwmechanics/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 178486965..1eb58f4d3 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2423,7 +2423,7 @@ void CharacterController::update(float duration, bool animationOnly) moved.y() *= scale; // Ensure we're moving in generally the right direction... - if(speed > 0.f) + if (speed > 0.f && moved != osg::Vec3f()) { float l = moved.length(); if (std::abs(movement.x() - moved.x()) > std::abs(moved.x()) / 2 ||