From a97eae864d1cfaae4df1e4c5f3975bb5bfed3ef9 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 26 Feb 2016 13:15:41 +0100 Subject: [PATCH] Fix the ObstacleCheck time step (Fixes #3211) --- apps/openmw/mwmechanics/obstacle.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/openmw/mwmechanics/obstacle.cpp b/apps/openmw/mwmechanics/obstacle.cpp index 5815d8cbe..11bbd1e31 100644 --- a/apps/openmw/mwmechanics/obstacle.cpp +++ b/apps/openmw/mwmechanics/obstacle.cpp @@ -120,14 +120,10 @@ namespace MWMechanics const MWWorld::Class& cls = actor.getClass(); ESM::Position pos = actor.getRefData().getPosition(); - // actors can move at most 60 fps (the physics framerate). - // the max() can be removed if we implement physics interpolation. - float movementDuration = std::max(1/60.f, duration); - if(mDistSameSpot == -1) mDistSameSpot = DIST_SAME_SPOT * cls.getSpeed(actor); - float distSameSpot = mDistSameSpot * movementDuration; + float distSameSpot = mDistSameSpot * duration; bool samePosition = (osg::Vec2f(pos.pos[0], pos.pos[1]) - osg::Vec2f(mPrevX, mPrevY)).length2() < distSameSpot * distSameSpot;