mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 22:53:54 +00:00
Avoid a map lookup for every skin body part when updating
This commit is contained in:
parent
6de56615aa
commit
4df1f198a7
1 changed files with 8 additions and 4 deletions
|
@ -357,11 +357,15 @@ void NpcAnimation::updateParts(bool forceupdate)
|
|||
}
|
||||
}
|
||||
|
||||
for (int part = ESM::PRT_Neck; part < ESM::PRT_Count; ++part)
|
||||
const std::vector<const ESM::BodyPart*> &parts = sRaceMapping[thisCombination];
|
||||
for(int part = ESM::PRT_Neck; part < ESM::PRT_Count; ++part)
|
||||
{
|
||||
const ESM::BodyPart* bodypart = sRaceMapping[thisCombination][part];
|
||||
if (mPartPriorities[part] < 1 && bodypart)
|
||||
addOrReplaceIndividualPart(part, -1,1, "meshes\\"+bodypart->mModel);
|
||||
if(mPartPriorities[part] < 1)
|
||||
{
|
||||
const ESM::BodyPart* bodypart = parts[part];
|
||||
if(bodypart)
|
||||
addOrReplaceIndividualPart(part, -1,1, "meshes\\"+bodypart->mModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue