mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-10-03 10:03:49 -04:00
Alternative fix to mesh crash bug
This commit is contained in:
parent
d911653846
commit
d32563063b
@ -767,7 +767,12 @@ void NIFLoader::handleNode(Nif::Node *node, int flags,
|
|||||||
|
|
||||||
if (!skel.isNull()) //if there is a skeleton
|
if (!skel.isNull()) //if there is a skeleton
|
||||||
{
|
{
|
||||||
bone = skel->createBone(node->name.toString());
|
std::string name = node->name.toString();
|
||||||
|
// Quick-n-dirty workaround for the fact that several
|
||||||
|
// bones may have the same name.
|
||||||
|
if(!skel->hasBone(name))
|
||||||
|
{
|
||||||
|
bone = skel->createBone(name);
|
||||||
|
|
||||||
if (parentBone)
|
if (parentBone)
|
||||||
parentBone->addChild(bone);
|
parentBone->addChild(bone);
|
||||||
@ -777,6 +782,7 @@ void NIFLoader::handleNode(Nif::Node *node, int flags,
|
|||||||
bone->setOrientation(convertRotation(node->trafo->rotation));
|
bone->setOrientation(convertRotation(node->trafo->rotation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Apply the parent transformation to this node. We overwrite the
|
// Apply the parent transformation to this node. We overwrite the
|
||||||
// existing data with the final transformation.
|
// existing data with the final transformation.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user