swap order of if-else blocks

This commit is contained in:
Andrew Meadows 2016-06-01 10:31:54 -07:00
parent d591561a88
commit 654468619c

View file

@ -599,11 +599,7 @@ bool RenderableModelEntityItem::isReadyToComputeShape() {
void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
ShapeType type = getShapeType();
if (type != SHAPE_TYPE_COMPOUND) {
ModelEntityItem::computeShapeInfo(info);
info.setParams(type, 0.5f * getDimensions());
adjustShapeInfoByRegistration(info);
} else {
if (type == SHAPE_TYPE_COMPOUND) {
updateModelBounds();
// should never fall in here when collision model not fully loaded
@ -709,6 +705,10 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
info.setParams(type, collisionModelDimensions, _compoundShapeURL);
info.setConvexHulls(points);
info.setOffset(_model->getOffset());
} else {
ModelEntityItem::computeShapeInfo(info);
info.setParams(type, 0.5f * getDimensions());
adjustShapeInfoByRegistration(info);
}
}