mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 03:39:14 +00:00
Merge branch 'reallyskipphysics' into 'master'
Close race that breaks scripted teleporting (#5873) See merge request OpenMW/openmw!639
This commit is contained in:
commit
e9aa161ffc
@ -174,6 +174,9 @@ osg::Vec3f Actor::getCollisionObjectPosition() const
|
|||||||
bool Actor::setPosition(const osg::Vec3f& position)
|
bool Actor::setPosition(const osg::Vec3f& position)
|
||||||
{
|
{
|
||||||
std::scoped_lock lock(mPositionMutex);
|
std::scoped_lock lock(mPositionMutex);
|
||||||
|
// position is being forced, ignore simulation results until we sync up
|
||||||
|
if (mSkipSimulation)
|
||||||
|
return false;
|
||||||
bool hasChanged = mPosition != position || mPositionOffset.length() != 0 || mWorldPositionChanged;
|
bool hasChanged = mPosition != position || mPositionOffset.length() != 0 || mWorldPositionChanged;
|
||||||
mPreviousPosition = mPosition + mPositionOffset;
|
mPreviousPosition = mPosition + mPositionOffset;
|
||||||
mPosition = position + mPositionOffset;
|
mPosition = position + mPositionOffset;
|
||||||
|
Loading…
Reference in New Issue
Block a user