Merge branch 'fixagainsetposforgoodthistimeitwillnotbreakanything' into 'master'

Fix #5961: Follow up MR 722: do not apply mPositionOffset twice when we teleport.

Closes #5961

See merge request OpenMW/openmw!744
pull/3067/head
psi29a 4 years ago
commit af8bc7d120

@ -121,6 +121,7 @@ void Actor::updatePosition()
mPreviousPosition = mWorldPosition;
mPosition = mWorldPosition;
mSimulationPosition = mWorldPosition;
mPositionOffset = osg::Vec3f();
mStandingOnPtr = nullptr;
mSkipSimulation = true;
}
@ -196,7 +197,6 @@ void Actor::applyOffsetChange()
{
if (mPositionOffset.length() == 0)
return;
mWorldPosition += mPositionOffset;
mPosition += mPositionOffset;
mPreviousPosition += mPositionOffset;
mSimulationPosition += mPositionOffset;

Loading…
Cancel
Save