mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 21:40:15 +00:00
Race dialog: remove incorrect assumption about numeric index in head/hair record IDs
This commit is contained in:
parent
7faa849cef
commit
3519d23518
@ -128,11 +128,17 @@ namespace MWGui
|
||||
setRaceId(proto.mRace);
|
||||
recountParts();
|
||||
|
||||
std::string index = proto.mHead.substr(proto.mHead.size() - 2, 2);
|
||||
mFaceIndex = boost::lexical_cast<int>(index) - 1;
|
||||
for (unsigned int i=0; i<mAvailableHeads.size(); ++i)
|
||||
{
|
||||
if (mAvailableHeads[i] == proto.mHead)
|
||||
mFaceIndex = i;
|
||||
}
|
||||
|
||||
index = proto.mHair.substr(proto.mHair.size() - 2, 2);
|
||||
mHairIndex = boost::lexical_cast<int>(index) - 1;
|
||||
for (unsigned int i=0; i<mAvailableHairs.size(); ++i)
|
||||
{
|
||||
if (mAvailableHairs[i] == proto.mHair)
|
||||
mHairIndex = i;
|
||||
}
|
||||
|
||||
mPreviewImage->setImageTexture (textureName);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user