replaced loops in EntityManager::updatePhysics with rangebased for