mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 11:15:33 +00:00
Merge branch 'xanimphysics' into 'master'
Fix animated object physics Closes #7164 See merge request OpenMW/openmw!2623
This commit is contained in:
commit
a7e37509de
1 changed files with 5 additions and 1 deletions
|
@ -496,7 +496,11 @@ namespace MWPhysics
|
|||
{
|
||||
if (ptr.mRef->mData.mPhysicsPostponed)
|
||||
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)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue