1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 19:53:53 +00:00

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
This commit is contained in:
psi29a 2021-04-15 22:09:44 +00:00
commit af8bc7d120

View file

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