mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
optimizer: avoid reordering nodes
Fixes an osgParticle cloning issue. (Fixes #3773)
This commit is contained in:
parent
a95773beef
commit
5caf53b6a3
1 changed files with 2 additions and 1 deletions
|
@ -847,10 +847,11 @@ void Optimizer::RemoveRedundantNodesVisitor::removeRedundantNodes()
|
|||
pitr!=parents.end();
|
||||
++pitr)
|
||||
{
|
||||
unsigned int childIndex = (*pitr)->getChildIndex(group);
|
||||
for (unsigned int i=0; i<group->getNumChildren(); ++i)
|
||||
{
|
||||
osg::Node* child = group->getChild(i);
|
||||
(*pitr)->addChild(child);
|
||||
(*pitr)->insertChild(childIndex++, child);
|
||||
}
|
||||
|
||||
(*pitr)->removeChild(group);
|
||||
|
|
Loading…
Reference in a new issue