Game Development Community

1.7.3 - onRemoveFromScene() callback bug

by Michael Woerister · in Torque Game Builder · 06/21/2008 (7:01 am) · 2 replies

Hey there,

there is a bug in t2dSceneGraph::removeFromScene( t2dSceneObject* pSceneObject2D ). At the end of the method the onRemoveFromScene script callback is triggered like this:
Con::executef(pSceneObject2D, 2, "onRemoveFromScene", this );

It should be like this:
Con::executef(pSceneObject2D, 2, "onRemoveFromScene", [b]this->getIdString()[/b] );

Otherwise the %sceneGraph parameter in onRemoveFromScene() is just memory garbage.

#1
06/23/2011 (4:56 am)
Same applies to 1.7.5
#2
06/28/2011 (7:17 am)
Good catch! This might explain an odd bug I was having. :-)