mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
Use male bodyparts as fallback for females in the editor
This commit is contained in:
parent
7eb1b14b21
commit
ac848b0902
@ -110,11 +110,19 @@ namespace CSMWorld
|
||||
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))
|
||||
{
|
||||
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];
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ namespace CSMWorld
|
||||
/// Returns the skeleton the actor should use for attaching parts to
|
||||
std::string getSkeleton() const;
|
||||
/// 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
|
||||
bool hasDependency(const std::string& id) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user