From 1327e124384a1d29fe573182cd98146d39981895 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sun, 3 Oct 2010 00:55:59 -0500 Subject: Correct rendering of prims as user meshes/analytical shapes when not set to convex hull or no physics. --- indra/newview/llspatialpartition.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra') 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); -- cgit v1.2.3