mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 17:39:40 +00:00
Follow up MR 722: do not apply mPositionOffset twice when we teleport.
Previous MR change the meaning of mPositionOffset: it is now just a log of relative movement that were already applied to allow the physics simulation to catch up, instead of changes that needs to be applied. As such, after a teleport we need to reset it. Also, since mWorldPosition is already with the offset we should not update its value in applyPositionOffset().
This commit is contained in:
parent
4f72fa2615
commit
e31cf7e6ac
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue