diff --git a/src/bounce/dynamics/world.cpp b/src/bounce/dynamics/world.cpp index 04dde31..aa9647a 100644 --- a/src/bounce/dynamics/world.cpp +++ b/src/bounce/dynamics/world.cpp @@ -370,11 +370,9 @@ void b3World::StepCloth(float32 dt) { B3_PROFILE("Step Cloth"); - b3Cloth* c = m_clothList.m_head; - while (c) + for (b3Cloth* c = m_clothList.m_head; c; c = c->GetNext()) { c->Step(dt, m_gravity); - c = c->GetNext(); } }