mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:21:24 +02:00
swap order of if-else blocks
This commit is contained in:
parent
d591561a88
commit
654468619c
1 changed files with 5 additions and 5 deletions
|
@ -599,11 +599,7 @@ bool RenderableModelEntityItem::isReadyToComputeShape() {
|
||||||
|
|
||||||
void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
|
void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& info) {
|
||||||
ShapeType type = getShapeType();
|
ShapeType type = getShapeType();
|
||||||
if (type != SHAPE_TYPE_COMPOUND) {
|
if (type == SHAPE_TYPE_COMPOUND) {
|
||||||
ModelEntityItem::computeShapeInfo(info);
|
|
||||||
info.setParams(type, 0.5f * getDimensions());
|
|
||||||
adjustShapeInfoByRegistration(info);
|
|
||||||
} else {
|
|
||||||
updateModelBounds();
|
updateModelBounds();
|
||||||
|
|
||||||
// should never fall in here when collision model not fully loaded
|
// 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.setParams(type, collisionModelDimensions, _compoundShapeURL);
|
||||||
info.setConvexHulls(points);
|
info.setConvexHulls(points);
|
||||||
info.setOffset(_model->getOffset());
|
info.setOffset(_model->getOffset());
|
||||||
|
} else {
|
||||||
|
ModelEntityItem::computeShapeInfo(info);
|
||||||
|
info.setParams(type, 0.5f * getDimensions());
|
||||||
|
adjustShapeInfoByRegistration(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue