Page 1 of 1

Should I use remove() or SceneManager->addToDeletionQueue

Posted: Wed Mar 11, 2009 4:56 pm
by Adversus
Should I call remove() or SceneManager->addToDeletionQueue(this) to remove a node I'm currently in.

I would imagine the second but not sure.

Posted: Wed Mar 11, 2009 6:46 pm
by bitplane
If you need to remove something from inside drawAll() (in OnPreRender, OnAnimate, etc) then use addToDeletionQueue, otherwise you can safely call remove.
It just prevents messing up the parent's Children's list iterator while Irrlicht is iterating through the list

Posted: Thu Mar 12, 2009 1:57 pm
by Adversus
OK but what about Animators, I want one to remove itself after a certain period of time.

Posted: Thu Mar 12, 2009 3:58 pm
by Adversus
Agh this has been covered and aparently the new fix is in subversion although I just copied and pasted the code.

http://irrlicht.sourceforge.net/phpBB2/ ... e+animator