mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 22:53:54 +00:00
Allow some more third person fallbacks in first person
This commit is contained in:
parent
5ee889e8b6
commit
3771e5839e
1 changed files with 25 additions and 2 deletions
|
@ -336,9 +336,10 @@ void NpcAnimation::updateParts(bool forceupdate)
|
|||
{
|
||||
if(mViewMode == VM_FirstPerson && (bodypart.mData.mPart == ESM::BodyPart::MP_Hand ||
|
||||
bodypart.mData.mPart == ESM::BodyPart::MP_Wrist ||
|
||||
bodypart.mData.mPart == ESM::BodyPart::MP_Forearm))
|
||||
bodypart.mData.mPart == ESM::BodyPart::MP_Forearm ||
|
||||
bodypart.mData.mPart == ESM::BodyPart::MP_Upperarm))
|
||||
{
|
||||
/* Allow 3rd person skins as a fallback for the forearms if 1st person is missing. */
|
||||
/* Allow 3rd person skins as a fallback for the arms if 1st person is missing. */
|
||||
BodyPartMapType::const_iterator bIt = sBodyPartMap.lower_bound(BodyPartMapType::key_type(bodypart.mData.mPart));
|
||||
while(bIt != sBodyPartMap.end() && bIt->first == bodypart.mData.mPart)
|
||||
{
|
||||
|
@ -499,9 +500,31 @@ void NpcAnimation::addPartGroup(int group, int priority, const std::vector<ESM::
|
|||
{
|
||||
const ESM::BodyPart *bodypart = 0;
|
||||
if(!mNpc->isMale() && !part->mFemale.empty())
|
||||
{
|
||||
bodypart = partStore.search(part->mFemale+ext);
|
||||
if(!bodypart && mViewMode == VM_FirstPerson)
|
||||
{
|
||||
bodypart = partStore.search(part->mFemale);
|
||||
if(bodypart && !(bodypart->mData.mPart == ESM::BodyPart::MP_Hand ||
|
||||
bodypart->mData.mPart == ESM::BodyPart::MP_Wrist ||
|
||||
bodypart->mData.mPart == ESM::BodyPart::MP_Forearm ||
|
||||
bodypart->mData.mPart == ESM::BodyPart::MP_Upperarm))
|
||||
bodypart = NULL;
|
||||
}
|
||||
}
|
||||
if(!bodypart && !part->mMale.empty())
|
||||
{
|
||||
bodypart = partStore.search(part->mMale+ext);
|
||||
if(!bodypart && mViewMode == VM_FirstPerson)
|
||||
{
|
||||
bodypart = partStore.search(part->mMale);
|
||||
if(bodypart && !(bodypart->mData.mPart == ESM::BodyPart::MP_Hand ||
|
||||
bodypart->mData.mPart == ESM::BodyPart::MP_Wrist ||
|
||||
bodypart->mData.mPart == ESM::BodyPart::MP_Forearm ||
|
||||
bodypart->mData.mPart == ESM::BodyPart::MP_Upperarm))
|
||||
bodypart = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if(bodypart)
|
||||
addOrReplaceIndividualPart(part->mPart, group, priority, "meshes\\"+bodypart->mModel);
|
||||
|
|
Loading…
Reference in a new issue