mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 13:36:41 +00:00
Fix animated object physics
This commit is contained in:
parent
ee862fe825
commit
b261f3bf65
1 changed files with 5 additions and 1 deletions
|
@ -496,7 +496,11 @@ namespace MWPhysics
|
||||||
{
|
{
|
||||||
if (ptr.mRef->mData.mPhysicsPostponed)
|
if (ptr.mRef->mData.mPhysicsPostponed)
|
||||||
return;
|
return;
|
||||||
osg::ref_ptr<Resource::BulletShapeInstance> shapeInstance = mShapeManager->getInstance(mesh);
|
|
||||||
|
std::string animationMesh = mesh;
|
||||||
|
if (ptr.getClass().useAnim())
|
||||||
|
animationMesh = Misc::ResourceHelpers::correctActorModelPath(mesh, mResourceSystem->getVFS());
|
||||||
|
osg::ref_ptr<Resource::BulletShapeInstance> shapeInstance = mShapeManager->getInstance(animationMesh);
|
||||||
if (!shapeInstance || !shapeInstance->mCollisionShape)
|
if (!shapeInstance || !shapeInstance->mCollisionShape)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue