summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloatermodelpreview.cpp2
-rw-r--r--indra/newview/llvovolume.cpp23
2 files changed, 19 insertions, 6 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d3da7533ec..142767529e 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1837,7 +1837,7 @@ void LLModelLoader::processJointNode( domNode* pNode, std::map<std::string,LLMat
{
//Translation via child from element
daeElement* pTranslateElement = getChildFromElement( pNode, "translate" );
- if ( pTranslateElement && pTranslateElement->typeID() != domTranslate::ID() )
+ if ( !pTranslateElement || pTranslateElement->typeID() != domTranslate::ID() )
{
llwarns<< "The found element is not a translate node" <<llendl;
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 9aebfcba4a..39e286ac38 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2950,6 +2950,7 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
// these multipliers are variable and can be floating point
F32 scale = 0.f;
F32 twist = 0.f;
+ F32 revolutions = 0.f;
const LLDrawable* drawablep = mDrawable;
@@ -3046,6 +3047,13 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
// scale to degrees / 90 by multiplying by 2.
twist = twist_mag * 2.f;
+ // multiply by the number of revolutions in the prim. cap at 4.
+ revolutions = path_params.getRevolutions();
+ if (revolutions > 4.f)
+ {
+ revolutions = 4.f;
+ }
+
// double cost for circular profiles / sculpties
if (profile_params.getCurveType() == LL_PCODE_PROFILE_CIRCLE ||
profile_params.getCurveType() == LL_PCODE_PROFILE_CIRCLE_HALF)
@@ -3135,11 +3143,6 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
shame *= hollow * ARC_HOLLOW_MULT;
}
- if (twist > 1.f)
- {
- shame = (U32)(shame * twist);
- }
-
if (circular_profile)
{
shame *= circular_profile * ARC_CIRC_PROF_MULT;
@@ -3170,11 +3173,21 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
shame *= shiny * ARC_SHINY_MULT;
}
+ if (twist > 1.f)
+ {
+ shame = (U32)(shame * twist);
+ }
+
if (scale > 1.f)
{
shame = (U32)(shame *scale);
}
+ if (revolutions > 1.f)
+ {
+ shame = (U32)(shame * revolutions);
+ }
+
// add additional costs
shame += particles * ARC_PARTICLE_COST;