mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 11:09:41 +00:00
Use male bodyparts as fallback for females in the editor
This commit is contained in:
parent
7eb1b14b21
commit
ac848b0902
2 changed files with 11 additions and 3 deletions
|
@ -110,11 +110,19 @@ namespace CSMWorld
|
||||||
return SceneUtil::getActorSkeleton(firstPerson, mFemale, beast, werewolf);
|
return SceneUtil::getActorSkeleton(firstPerson, mFemale, beast, werewolf);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& ActorAdapter::ActorData::getPart(ESM::PartReferenceType index) const
|
const std::string ActorAdapter::ActorData::getPart(ESM::PartReferenceType index) const
|
||||||
{
|
{
|
||||||
if (mParts[index].empty() && mRaceData && mRaceData->handlesPart(index))
|
if (mParts[index].empty() && mRaceData && mRaceData->handlesPart(index))
|
||||||
{
|
{
|
||||||
return mFemale ? mRaceData->getFemalePart(index) : mRaceData->getMalePart(index);
|
if (mFemale)
|
||||||
|
{
|
||||||
|
// Note: we should use male parts for females as fallback
|
||||||
|
const std::string femalePart = mRaceData->getFemalePart(index);
|
||||||
|
if (!femalePart.empty())
|
||||||
|
return femalePart;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mRaceData->getMalePart(index);
|
||||||
}
|
}
|
||||||
return mParts[index];
|
return mParts[index];
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace CSMWorld
|
||||||
/// Returns the skeleton the actor should use for attaching parts to
|
/// Returns the skeleton the actor should use for attaching parts to
|
||||||
std::string getSkeleton() const;
|
std::string getSkeleton() const;
|
||||||
/// Retrieves the associated actor part
|
/// Retrieves the associated actor part
|
||||||
const std::string& getPart(ESM::PartReferenceType index) const;
|
const std::string getPart(ESM::PartReferenceType index) const;
|
||||||
/// Checks if the actor has a data dependency
|
/// Checks if the actor has a data dependency
|
||||||
bool hasDependency(const std::string& id) const;
|
bool hasDependency(const std::string& id) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue