mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-28 08:37:12 +00:00
Skip simulation result after calling Actor::updatePosition(). Otherwise
when going out of tcl the player would go back to previous position for one frame.
This commit is contained in:
parent
83af0402b8
commit
6ad2cf8e4f
@ -124,11 +124,13 @@ void Actor::updatePosition()
|
||||
mPositionOffset = osg::Vec3f();
|
||||
mStandingOnPtr = nullptr;
|
||||
mSkipCollisions = true;
|
||||
mSkipSimulation = true;
|
||||
}
|
||||
|
||||
void Actor::setSimulationPosition(const osg::Vec3f& position)
|
||||
{
|
||||
mSimulationPosition = position;
|
||||
if (!std::exchange(mSkipSimulation, false))
|
||||
mSimulationPosition = position;
|
||||
}
|
||||
|
||||
osg::Vec3f Actor::getSimulationPosition() const
|
||||
|
@ -204,6 +204,7 @@ namespace MWPhysics
|
||||
osg::Vec3f mVelocity;
|
||||
bool mWorldPositionChanged;
|
||||
bool mSkipCollisions;
|
||||
bool mSkipSimulation;
|
||||
btTransform mLocalTransform;
|
||||
mutable std::mutex mPositionMutex;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user