1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-22 17:41:33 +00:00

Merge branch 'skip_async' into 'master'

Don't put player in the air after going out of tcl

See merge request OpenMW/openmw!1009

(cherry picked from commit 6d08a1d731)

6ad2cf8e Skip simulation result after calling Actor::updatePosition(). Otherwise
This commit is contained in:
psi29a 2021-07-16 07:50:26 +00:00
parent d1c0cfa524
commit 59da0a0da9
2 changed files with 4 additions and 1 deletions

View file

@ -124,10 +124,12 @@ void Actor::updatePosition()
mPositionOffset = osg::Vec3f();
mStandingOnPtr = nullptr;
mSkipCollisions = true;
mSkipSimulation = true;
}
void Actor::setSimulationPosition(const osg::Vec3f& position)
{
if (!std::exchange(mSkipSimulation, false))
mSimulationPosition = position;
}

View file

@ -204,6 +204,7 @@ namespace MWPhysics
osg::Vec3f mVelocity;
bool mWorldPositionChanged;
bool mSkipCollisions;
bool mSkipSimulation;
btTransform mLocalTransform;
mutable std::mutex mPositionMutex;