[tuhopuu-devel] Bugfix for gameengine code.

Joseph tuhopuu-devel@blender.org
Sat, 13 Mar 2004 16:16:29 -0800


Hi.  The following code (to be put in SM_Scene.cpp) seems to fix the 
problem in new SUMO-enabled  gameengine builds where objects 
(SM_Objects)  remain in memory after a user exits the gameengine mode. 

Who's doing the gameengine, anyway?  The CVS hasn't been updated for a 
long time. . .

SM_Scene::~SM_Scene()
{
    int i;
      if (m_objectList.begin() != m_objectList.end()) {
     // std::cout << "SM_Scene::~SM_Scene: There are still objects in 
the Sumo scene!" << std::endl;
     i = 0;
      do {
        delete m_objectList[i];
        i=i+1;
      } while (i < m_objectList.size());
    }
    DT_DestroyRespTable(m_respTable);
    DT_DestroyScene(m_scene);
}

joeedh