mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Code style improvement
This commit is contained in:
parent
7480dea1a9
commit
d0f9aca859
1 changed files with 10 additions and 6 deletions
|
|
@ -107,19 +107,23 @@ void TSPartInstance::breakShape(TSShapeInstance * shape, S32 subShape, Vector<TS
|
||||||
// update bounds (and get rid of empty parts)
|
// update bounds (and get rid of empty parts)
|
||||||
for (S32 i=0; i<partList.size(); i++)
|
for (S32 i=0; i<partList.size(); i++)
|
||||||
{
|
{
|
||||||
if (partList[i]->mMeshObjects.size()){
|
if (partList[i]->mMeshObjects.size())
|
||||||
|
{
|
||||||
partList[i]->updateBounds();
|
partList[i]->updateBounds();
|
||||||
// Remove any parts parts with invalid box
|
// Remove any parts parts with invalid box
|
||||||
Box3F box = partList[i]->getBounds();
|
Box3F box = partList[i]->getBounds();
|
||||||
if(!box.isValidBox() ){
|
if (!box.isValidBox())
|
||||||
|
{
|
||||||
Con::warnf("TSPartInstance::breakShape - part created with invalid object box. Removing from list.");
|
Con::warnf("TSPartInstance::breakShape - part created with invalid object box. Removing from list.");
|
||||||
partList.erase(i);
|
partList.erase(i);
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
partList.erase(i);
|
else
|
||||||
i--;
|
{
|
||||||
}
|
partList.erase(i);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue