svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22625:22668
[blender-staging.git] / source / gameengine / Converter / KX_BlenderSceneConverter.cpp
index 3220672c392bc4774ef2747fa8f662f0dc2f3276..151564391f307a3efd6bd609be51af3f39dd794a 100644 (file)
@@ -462,10 +462,11 @@ void KX_BlenderSceneConverter::RegisterGameObject(
        m_map_blender_to_gameobject.insert(CHashedPtr(for_blenderobject),gameobject);
 }
 
+/* only need to run this during conversion since
+ * m_map_blender_to_gameobject is freed after conversion */
 void KX_BlenderSceneConverter::UnregisterGameObject(
                                                                        KX_GameObject *gameobject) 
 {
-#if 0
        struct Object *bobp= gameobject->GetBlenderObject();
        if (bobp) {
                CHashedPtr bptr(bobp);
@@ -477,7 +478,6 @@ void KX_BlenderSceneConverter::UnregisterGameObject(
                        m_map_blender_to_gameobject.remove(bptr);
                }
        }
-#endif
 }
 
 KX_GameObject *KX_BlenderSceneConverter::FindGameObject(