With regard to ISceneNode::remove()

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: With regard to ISceneNode::remove()

Post by CuteAlien »

No - adding a drop() call to remove() when the parent is 0 would be wrong. Because the scenegraph wouldn't have added a reference - so dropping it would be bad. For example you can set a parent to 0 for a sceneobject which had a parent before. This will cause a drop. Adding a second drop() on remove() would crash it then. Also then it would start to be complicated to explain when to use/not use drop. So far it's simple - when you created an object with new (your case) or a function starting with the word create then you have to call drop() in Irrlicht. Or when you called grab() yourself.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply