From b652774324e0cdf01cf7a75a45abb05391654809 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Mon, 18 Jul 2016 17:28:02 +0300
Subject: [PATCH] Backed out changeset: a1a0a055e892

---
 indra/newview/app_settings/settings.xml | 11 -----------
 indra/newview/llappviewer.cpp           |  1 -
 indra/newview/llviewercontrol.cpp       |  7 -------
 indra/newview/llvovolume.cpp            |  6 +-----
 indra/newview/llvovolume.h              |  1 -
 5 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ae900c3ecd5..6106dde7340 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10218,17 +10218,6 @@
       <key>Value</key>
       <real>1.0</real>
     </map>
-    <key>RenderRiggedLODFactor</key>
-    <map>
-      <key>Comment</key>
-      <string>Controls level of detail of worn rigged meshes (multiplier for current screen area when calculated level of detail)</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>F32</string>
-      <key>Value</key>
-      <real>2.5</real>
-    </map>
     <key>RenderWater</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8406f09114d..acbcb4f8b7e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -587,7 +587,6 @@ static void settings_to_globals()
 	LLImageGL::sGlobalUseAnisotropic	= gSavedSettings.getBOOL("RenderAnisotropic");
 	LLImageGL::sCompressTextures		= gSavedSettings.getBOOL("RenderCompressTextures");
 	LLVOVolume::sLODFactor				= gSavedSettings.getF32("RenderVolumeLODFactor");
-	LLVOVolume::sRiggedLODFactor	= gSavedSettings.getF32("RenderRiggedLODFactor");
 	LLVOVolume::sDistanceFactor			= 1.f-LLVOVolume::sLODFactor * 0.1f;
 	LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor");
 	LLVOTree::sTreeFactor				= gSavedSettings.getF32("RenderTreeLODFactor");
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index abb92476d61..16f40fb7473 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -207,12 +207,6 @@ static bool handleVolumeLODChanged(const LLSD& newvalue)
 	return true;
 }
 
-static bool handleRiggedLODChanged(const LLSD& newvalue)
-{
-    LLVOVolume::sRiggedLODFactor = (F32)newvalue.asReal();
-    return true;
-}
-
 static bool handleAvatarLODChanged(const LLSD& newvalue)
 {
 	LLVOAvatar::sLODFactor = (F32) newvalue.asReal();
@@ -625,7 +619,6 @@ void settings_setup_listeners()
 	gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
 	gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
 	gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2));
-	gSavedSettings.getControl("RenderRiggedLODFactor")->getSignal()->connect(boost::bind(&handleRiggedLODChanged, _2));
 	gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2));
 	gSavedSettings.getControl("RenderAvatarPhysicsLODFactor")->getSignal()->connect(boost::bind(&handleAvatarPhysicsLODChanged, _2));
 	gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _2));
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 177ad9ab3d3..486f6fae612 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -86,7 +86,6 @@ BOOL gAnimateTextures = TRUE;
 //extern BOOL gHideSelectedObjects;
 
 F32 LLVOVolume::sLODFactor = 1.f;
-F32 LLVOVolume::sRiggedLODFactor = 2.f;
 F32	LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop 
 F32 LLVOVolume::sDistanceFactor = 1.0f;
 S32 LLVOVolume::sNumLODChanges = 0;
@@ -1253,10 +1252,7 @@ BOOL LLVOVolume::calcLOD()
 		}
 
 		distance = avatar->mDrawable->mDistanceWRTCamera;
-		F32 avatar_radius = avatar->getBinRadius();
-		F32 object_radius = getVolume() ? getVolume()->mLODScaleBias.scaledVec(getScale()).length() : getScale().length();
-		radius = object_radius * LLVOVolume::sRiggedLODFactor;
-		radius = llmin(radius, avatar_radius);
+		radius = avatar->getBinRadius();
 	}
 	else
 	{
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index b63d76d1325..a3319083200 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -379,7 +379,6 @@ class LLVOVolume : public LLViewerObject
 public:
 	static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop
 	static F32 sLODFactor;				// LOD scale factor
-	static F32 sRiggedLODFactor;	// Worn rigged LOD scale factor
 	static F32 sDistanceFactor;			// LOD distance factor
 
 	static LLPointer<LLObjectMediaDataClient> sObjectMediaClient;
-- 
GitLab