1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 21:32:42 +00:00
OpenMW/apps/openmw/mwrender/actorutil.cpp
2024-01-01 13:58:55 +01:00

41 lines
1.3 KiB
C++

#include "actorutil.hpp"
#include <components/settings/values.hpp>
#include <components/vfs/pathutil.hpp>
namespace MWRender
{
const std::string& getActorSkeleton(bool firstPerson, bool isFemale, bool isBeast, bool isWerewolf)
{
if (!firstPerson)
{
if (isWerewolf)
return Settings::models().mWolfskin;
else if (isBeast)
return Settings::models().mBaseanimkna;
else if (isFemale)
return Settings::models().mBaseanimfemale;
else
return Settings::models().mBaseanim;
}
else
{
if (isWerewolf)
return Settings::models().mWolfskin1st;
else if (isBeast)
return Settings::models().mBaseanimkna1st;
else if (isFemale)
return Settings::models().mBaseanimfemale1st;
else
return Settings::models().mXbaseanim1st;
}
}
bool isDefaultActorSkeleton(std::string_view model)
{
return VFS::Path::pathEqual(Settings::models().mBaseanimkna.get(), model)
|| VFS::Path::pathEqual(Settings::models().mBaseanimfemale.get(), model)
|| VFS::Path::pathEqual(Settings::models().mBaseanim.get(), model);
}
}