From ab1724d3db1db59b789171d6b013639fcc195c8b Mon Sep 17 00:00:00 2001 From: logzero Date: Sat, 24 Dec 2016 12:38:23 +0100 Subject: [PATCH] Compare new velocity to the original velocity. Using old velocity seems awkward, probably a copypaste/refactoring bug. --- apps/openmw/mwphysics/physicssystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp index ab7117a106..14e05f101e 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -419,7 +419,7 @@ namespace MWPhysics if ((newVelocity-velocity).length2() < 0.01) break; - if ((velocity * origVelocity) <= 0.f) + if ((newVelocity * origVelocity) <= 0.f) break; // ^ dot product velocity = newVelocity;