mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 12:39:41 +00:00
Merge branch 'catfight' into 'master'
Restore female/beast-specific first person animations (#8179) Closes #8179 See merge request OpenMW/openmw!4392
This commit is contained in:
commit
1bc130332e
1 changed files with 25 additions and 28 deletions
|
@ -484,15 +484,24 @@ namespace MWRender
|
|||
bool is1stPerson = mViewMode == VM_FirstPerson;
|
||||
bool isBeast = (race->mData.mFlags & ESM::Race::Beast) != 0;
|
||||
|
||||
std::string_view base;
|
||||
if (!isWerewolf)
|
||||
{
|
||||
if (!is1stPerson)
|
||||
base = Settings::models().mXbaseanim.get().value();
|
||||
else
|
||||
base = Settings::models().mXbaseanim1st.get().value();
|
||||
}
|
||||
|
||||
const std::string defaultSkeleton = Misc::ResourceHelpers::correctActorModelPath(
|
||||
getActorSkeleton(is1stPerson, isFemale, isBeast, isWerewolf), mResourceSystem->getVFS());
|
||||
|
||||
std::string smodel = defaultSkeleton;
|
||||
bool isBase = !isWerewolf;
|
||||
bool isCustomModel = false;
|
||||
if (!is1stPerson && !isWerewolf && !mNpc->mModel.empty())
|
||||
{
|
||||
std::string model = Misc::ResourceHelpers::correctMeshPath(mNpc->mModel);
|
||||
isBase = isDefaultActorSkeleton(model);
|
||||
isCustomModel = !isDefaultActorSkeleton(model);
|
||||
smodel = Misc::ResourceHelpers::correctActorModelPath(model, mResourceSystem->getVFS());
|
||||
}
|
||||
|
||||
|
@ -500,33 +509,21 @@ namespace MWRender
|
|||
|
||||
updateParts();
|
||||
|
||||
if (!is1stPerson)
|
||||
if (!base.empty())
|
||||
addAnimSource(base, smodel);
|
||||
|
||||
if (defaultSkeleton != base)
|
||||
addAnimSource(defaultSkeleton, smodel);
|
||||
|
||||
if (isCustomModel)
|
||||
addAnimSource(smodel, smodel);
|
||||
|
||||
const bool customArgonianSwim = !is1stPerson && !isWerewolf && isBeast && mNpc->mRace.contains("argonian");
|
||||
if (customArgonianSwim)
|
||||
addAnimSource(Settings::models().mXargonianswimkna.get().value(), smodel);
|
||||
|
||||
if (is1stPerson)
|
||||
{
|
||||
const std::string& base = Settings::models().mXbaseanim.get().value();
|
||||
if (!isWerewolf)
|
||||
addAnimSource(base, smodel);
|
||||
|
||||
if (!isBase)
|
||||
{
|
||||
addAnimSource(defaultSkeleton, smodel);
|
||||
addAnimSource(smodel, smodel);
|
||||
}
|
||||
else if (base != defaultSkeleton)
|
||||
{
|
||||
addAnimSource(defaultSkeleton, smodel);
|
||||
}
|
||||
|
||||
if (!isWerewolf && isBeast && mNpc->mRace.contains("argonian"))
|
||||
addAnimSource("meshes\\xargonian_swimkna.nif", smodel);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isWerewolf)
|
||||
addAnimSource(Settings::models().mXbaseanim1st.get().value(), smodel);
|
||||
|
||||
if (!isBase)
|
||||
addAnimSource(smodel, smodel);
|
||||
|
||||
mObjectRoot->setNodeMask(Mask_FirstPerson);
|
||||
mObjectRoot->addCullCallback(new OverrideFieldOfViewCallback(mFirstPersonFieldOfView));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue