summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-03 00:55:59 -0500
committerDave Parks <davep@lindenlab.com>2010-10-03 00:55:59 -0500
commit1327e124384a1d29fe573182cd98146d39981895 (patch)
treebe24dc0e0df7cfa2a79d9bdf790f5b520ccb5f3f /indra/newview
parent34583419449fcde5a77396bc4195d88e040fbffc (diff)
Correct rendering of prims as user meshes/analytical shapes when not set to convex hull or no physics.
Diffstat (limited to 'indra/newview')
-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);