fixed Engine::removeObject() to destroy the OdeWorld object as well to remove it from the physics computations

git-svn-id: svn://anubis/anaglym/trunk@108 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2009-10-19 16:22:59 +00:00
parent 2f0bef4297
commit c9b0bc2d82

View File

@ -156,8 +156,12 @@ int Engine::addObject(WFObj * obj, bool is_static, float scale)
void Engine::removeObject(int id)
{
if (getObject(id) != NULL)
Object * obj = getObject(id);
if (obj != NULL)
{
m_objects.erase(id);
delete obj;
}
}
int Engine::cloneObject(const Engine::Object * obj)