mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 00:45:34 +00:00
Revert a wrong change introduced in MR 546
A prerequisite to create physics objects for statics was to remove the dependency on base node (since it doesn't yet exists) for object position. It is still necessary for animation though. Restore the basenode (and the associated FIXME) so that animated objects works properly.
This commit is contained in:
parent
f917037ead
commit
23137d0c54
2 changed files with 2 additions and 3 deletions
|
@ -116,9 +116,6 @@ namespace MWPhysics
|
|||
if (mShapeInstance->mAnimatedShapes.empty())
|
||||
return false;
|
||||
|
||||
if (mPtr.getRefData().getBaseNode() == nullptr)
|
||||
return true;
|
||||
|
||||
assert (mShapeInstance->getCollisionShape()->isCompound());
|
||||
|
||||
btCompoundShape* compound = static_cast<btCompoundShape*>(mShapeInstance->getCollisionShape());
|
||||
|
|
|
@ -122,6 +122,8 @@ namespace
|
|||
const ESM::RefNum& refnum = ptr.getCellRef().getRefNum();
|
||||
if (!refnum.hasContentFile() || pagedRefs.find(refnum) == pagedRefs.end())
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue