1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 09:09:43 +00:00

Fix regression with Collada-animated creatures

This commit is contained in:
Nelsson Huotari 2023-05-23 08:30:02 +00:00 committed by psi29a
parent a14bbcb62f
commit 4abd47f430

View file

@ -4,6 +4,7 @@
#include <osg/UserDataContainer>
#include <components/misc/resourcehelpers.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/sceneutil/positionattitudetransform.hpp>
#include <components/sceneutil/unrefqueue.hpp>
@ -78,7 +79,7 @@ namespace MWRender
if (animated && !mesh.empty())
{
animationMesh = Misc::ResourceHelpers::correctActorModelPath(mesh, mResourceSystem->getVFS());
if (animationMesh == mesh)
if (animationMesh == mesh && Misc::StringUtils::ciEndsWith(animationMesh, ".nif"))
animated = false;
}
@ -95,7 +96,7 @@ namespace MWRender
bool animated = true;
std::string animationMesh = Misc::ResourceHelpers::correctActorModelPath(mesh, mResourceSystem->getVFS());
if (animationMesh == mesh)
if (animationMesh == mesh && Misc::StringUtils::ciEndsWith(animationMesh, ".nif"))
animated = false;
// CreatureAnimation