mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 02:15:32 +00:00
Fix the ObstacleCheck time step (Fixes #3211)
This commit is contained in:
parent
195c3b9967
commit
a97eae864d
1 changed files with 1 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue