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:
parent
2f0bef4297
commit
c9b0bc2d82
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user