mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Allow some more third person fallbacks in first person
This commit is contained in:
parent
5ee889e8b6
commit
3771e5839e
@ -336,9 +336,10 @@ void NpcAnimation::updateParts(bool forceupdate)
|
|||||||
{
|
{
|
||||||
if(mViewMode == VM_FirstPerson && (bodypart.mData.mPart == ESM::BodyPart::MP_Hand ||
|
if(mViewMode == VM_FirstPerson && (bodypart.mData.mPart == ESM::BodyPart::MP_Hand ||
|
||||||
bodypart.mData.mPart == ESM::BodyPart::MP_Wrist ||
|
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));
|
BodyPartMapType::const_iterator bIt = sBodyPartMap.lower_bound(BodyPartMapType::key_type(bodypart.mData.mPart));
|
||||||
while(bIt != sBodyPartMap.end() && bIt->first == 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;
|
const ESM::BodyPart *bodypart = 0;
|
||||||
if(!mNpc->isMale() && !part->mFemale.empty())
|
if(!mNpc->isMale() && !part->mFemale.empty())
|
||||||
|
{
|
||||||
bodypart = partStore.search(part->mFemale+ext);
|
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())
|
if(!bodypart && !part->mMale.empty())
|
||||||
|
{
|
||||||
bodypart = partStore.search(part->mMale+ext);
|
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)
|
if(bodypart)
|
||||||
addOrReplaceIndividualPart(part->mPart, group, priority, "meshes\\"+bodypart->mModel);
|
addOrReplaceIndividualPart(part->mPart, group, priority, "meshes\\"+bodypart->mModel);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user