void Ship::DeleteBodyPartByName(const orxSTRING partName) { orxOBJECT *ship = this->GetOrxObject(); orxBODY *body = orxOBJECT_GET_STRUCTURE(ship, BODY); for (orxBODY_PART *part = orxBody_GetNextPart(body, orxNULL); part; part = orxBody_GetNextPart(body, part)) { if (orxString_Compare(orxBody_GetPartName(part), partName) == 0) { orxBody_RemovePart(part); } } }