1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

Improve the 'part has no parents' warning

This commit is contained in:
Andrei Kortunov 2018-09-30 10:35:01 +04:00
parent 4dc424036f
commit 632045e145

View file

@ -1975,12 +1975,12 @@ namespace MWRender
PartHolder::~PartHolder()
{
if (mNode.get() && !mNode->getNumParents())
Log(Debug::Verbose) << "Part has no parents" ;
Log(Debug::Verbose) << "Part \"" << mNode->getName() << "\" has no parents" ;
if (mNode.get() && mNode->getNumParents())
{
if (mNode->getNumParents() > 1)
Log(Debug::Verbose) << "Part has multiple (" << mNode->getNumParents() << ") parents";
Log(Debug::Verbose) << "Part \"" << mNode->getName() << "\" has multiple (" << mNode->getNumParents() << ") parents";
mNode->getParent(0)->removeChild(mNode);
}
}