I have a list of bodies consisting of m_mass 1.5 and say 1.0.
When I did the following:
for (b2Body* b = m_world->m_bodyList; b; b = b->m_next)
{
if (b->m_mass == 1.5f){
m_world->DestroyBody(b);
}
}
It destroys all my bodies instead of the ones with 1.5 only.
When I did the following:
for (b2Body* b = m_world->m_bodyList; b; b = b->m_next)
{
if (b->m_mass == 1.5f){
m_world->DestroyBody(b);
}
}
It destroys all my bodies instead of the ones with 1.5 only.