mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-15 17:06:44 +00:00
optimizer.cpp
This commit is contained in:
parent
cd4d76f8c5
commit
08608da62c
1 changed files with 4 additions and 4 deletions
|
@ -913,11 +913,11 @@ void Optimizer::RemoveRedundantNodesVisitor::removeRedundantNodes()
|
||||||
unsigned int childIndex = (*pitr)->getChildIndex(group);
|
unsigned int childIndex = (*pitr)->getChildIndex(group);
|
||||||
for (unsigned int i=0; i<group->getNumChildren(); ++i)
|
for (unsigned int i=0; i<group->getNumChildren(); ++i)
|
||||||
{
|
{
|
||||||
osg::Node* child = group->getChild(i);
|
if (i==0)
|
||||||
(*pitr)->insertChild(childIndex++, child);
|
(*pitr)->setChild(childIndex, group->getChild(i));
|
||||||
|
else
|
||||||
|
(*pitr)->insertChild(childIndex+i, group->getChild(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
(*pitr)->removeChild(group);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group->removeChildren(0, group->getNumChildren());
|
group->removeChildren(0, group->getNumChildren());
|
||||||
|
|
Loading…
Reference in a new issue