mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-18 18:40:06 +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);
|
setRaceId(proto.mRace);
|
||||||
recountParts();
|
recountParts();
|
||||||
|
|
||||||
std::string index = proto.mHead.substr(proto.mHead.size() - 2, 2);
|
for (unsigned int i=0; i<mAvailableHeads.size(); ++i)
|
||||||
mFaceIndex = boost::lexical_cast<int>(index) - 1;
|
{
|
||||||
|
if (mAvailableHeads[i] == proto.mHead)
|
||||||
|
mFaceIndex = i;
|
||||||
|
}
|
||||||
|
|
||||||
index = proto.mHair.substr(proto.mHair.size() - 2, 2);
|
for (unsigned int i=0; i<mAvailableHairs.size(); ++i)
|
||||||
mHairIndex = boost::lexical_cast<int>(index) - 1;
|
{
|
||||||
|
if (mAvailableHairs[i] == proto.mHair)
|
||||||
|
mHairIndex = i;
|
||||||
|
}
|
||||||
|
|
||||||
mPreviewImage->setImageTexture (textureName);
|
mPreviewImage->setImageTexture (textureName);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user