mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue