From b261f3bf659a7451ee5a3dc47cacec21068ec4cf Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Mon, 16 Jan 2023 17:08:48 +0300 Subject: [PATCH] Fix animated object physics --- apps/openmw/mwphysics/physicssystem.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp index 271a7218a1..8bf0e39240 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -496,7 +496,11 @@ namespace MWPhysics { if (ptr.mRef->mData.mPhysicsPostponed) return; - osg::ref_ptr shapeInstance = mShapeManager->getInstance(mesh); + + std::string animationMesh = mesh; + if (ptr.getClass().useAnim()) + animationMesh = Misc::ResourceHelpers::correctActorModelPath(mesh, mResourceSystem->getVFS()); + osg::ref_ptr shapeInstance = mShapeManager->getInstance(animationMesh); if (!shapeInstance || !shapeInstance->mCollisionShape) return;