1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Don't move characters if their animation can't move them

This commit is contained in:
Alexei Dobrohotov 2020-12-22 20:40:52 +03:00
parent fd5429ae56
commit 32cc14981e

View File

@ -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 ||