mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Set paged refs' base node to null (#6335)
This commit is contained in:
parent
78459314bf
commit
2fbdde34c6
@ -102,7 +102,11 @@ namespace MWPhysics
|
|||||||
updateScaleUnsafe();
|
updateScaleUnsafe();
|
||||||
|
|
||||||
if (!mRotationallyInvariant)
|
if (!mRotationallyInvariant)
|
||||||
mRotation = mPtr.getRefData().getBaseNode()->getAttitude();
|
{
|
||||||
|
const SceneUtil::PositionAttitudeTransform* baseNode = mPtr.getRefData().getBaseNode();
|
||||||
|
if (baseNode)
|
||||||
|
mRotation = baseNode->getAttitude();
|
||||||
|
}
|
||||||
|
|
||||||
addCollisionMask(getCollisionMask());
|
addCollisionMask(getCollisionMask());
|
||||||
updateCollisionObjectPositionUnsafe();
|
updateCollisionObjectPositionUnsafe();
|
||||||
|
@ -110,6 +110,9 @@ namespace MWPhysics
|
|||||||
if (mShapeInstance->mAnimatedShapes.empty())
|
if (mShapeInstance->mAnimatedShapes.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!mPtr.getRefData().getBaseNode())
|
||||||
|
return false;
|
||||||
|
|
||||||
assert(mShapeInstance->mCollisionShape->isCompound());
|
assert(mShapeInstance->mCollisionShape->isCompound());
|
||||||
|
|
||||||
btCompoundShape* compound = static_cast<btCompoundShape*>(mShapeInstance->mCollisionShape.get());
|
btCompoundShape* compound = static_cast<btCompoundShape*>(mShapeInstance->mCollisionShape.get());
|
||||||
|
@ -115,9 +115,7 @@ namespace
|
|||||||
if (!refnum.hasContentFile() || !std::binary_search(pagedRefs.begin(), pagedRefs.end(), refnum))
|
if (!refnum.hasContentFile() || !std::binary_search(pagedRefs.begin(), pagedRefs.end(), refnum))
|
||||||
ptr.getClass().insertObjectRendering(ptr, model, rendering);
|
ptr.getClass().insertObjectRendering(ptr, model, rendering);
|
||||||
else
|
else
|
||||||
ptr.getRefData().setBaseNode(
|
ptr.getRefData().setBaseNode(nullptr);
|
||||||
new SceneUtil::PositionAttitudeTransform); // FIXME remove this when physics code is fixed not to depend
|
|
||||||
// on basenode
|
|
||||||
setNodeRotation(ptr, rendering, rotation);
|
setNodeRotation(ptr, rendering, rotation);
|
||||||
|
|
||||||
if (ptr.getClass().useAnim())
|
if (ptr.getClass().useAnim())
|
||||||
|
Loading…
Reference in New Issue
Block a user