summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r--indra/newview/llspatialpartition.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index b46fc9ce63..327e29c6e4 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2781,6 +2781,13 @@ void renderNormals(LLDrawable* drawablep)
void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
{
+ U8 physics_type = volume->getPhysicsShapeType();
+
+ if (physics_type == LLViewerObject::PHYSICS_SHAPE_NONE)
+ {
+ return;
+ }
+
F32 threshold = gSavedSettings.getF32("ObjectCostHighThreshold");
F32 cost = volume->getObjectCost();
@@ -2804,7 +2811,9 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
LLVolumeParams volume_params = volume->getVolume()->getParams();
- LLPhysicsVolumeParams physics_params(volume->getVolume()->getParams(), false); //pass as true if type is convex hull
+ LLPhysicsVolumeParams physics_params(volume->getVolume()->getParams(),
+ physics_type == LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL);
+
LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification physics_spec;
LLPhysicsShapeBuilderUtil::determinePhysicsShape(physics_params, volume->getScale(), physics_spec);