1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-21 13:20:54 +00:00

Revert "Revert a wrong change introduced in MR 546"

This reverts commit 23137d0c54f555b30323359953e3db81ded3f361.
This commit is contained in:
Andrei Kortunov 2021-01-29 16:50:39 +04:00
parent 3b9f8b5fa2
commit f8e8496d36
2 changed files with 3 additions and 2 deletions

View File

@ -116,6 +116,9 @@ namespace MWPhysics
if (mShapeInstance->mAnimatedShapes.empty()) if (mShapeInstance->mAnimatedShapes.empty())
return false; return false;
if (mPtr.getRefData().getBaseNode() == nullptr)
return true;
assert (mShapeInstance->getCollisionShape()->isCompound()); assert (mShapeInstance->getCollisionShape()->isCompound());
btCompoundShape* compound = static_cast<btCompoundShape*>(mShapeInstance->getCollisionShape()); btCompoundShape* compound = static_cast<btCompoundShape*>(mShapeInstance->getCollisionShape());

View File

@ -122,8 +122,6 @@ namespace
const ESM::RefNum& refnum = ptr.getCellRef().getRefNum(); const ESM::RefNum& refnum = ptr.getCellRef().getRefNum();
if (!refnum.hasContentFile() || pagedRefs.find(refnum) == pagedRefs.end()) if (!refnum.hasContentFile() || pagedRefs.find(refnum) == pagedRefs.end())
ptr.getClass().insertObjectRendering(ptr, model, rendering); ptr.getClass().insertObjectRendering(ptr, model, rendering);
else
ptr.getRefData().setBaseNode(new SceneUtil::PositionAttitudeTransform); // FIXME remove this when physics code is fixed not to depend on basenode
setNodeRotation(ptr, rendering, rotation); setNodeRotation(ptr, rendering, rotation);