From 0280f6e63524bf8f4bc9741fb8086590a278accd Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 13 Jun 2009 21:55:31 -0700 Subject: Applied Aimee's patch for VWR-12631: setting to adjust the maximum size of objects displayed on the minimap (MiniMapPrimMaxRadius) --- linden/indra/newview/app_settings/settings.xml | 11 +++++++++++ linden/indra/newview/llnetmap.cpp | 6 +----- linden/indra/newview/llviewerobjectlist.cpp | 4 ++++ 3 files changed, 16 insertions(+), 5 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index f23daee..774a13b 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -4808,6 +4808,17 @@ Value 1 + MiniMapPrimMaxRadius + + Comment + Radius of the largest prim to show on the MiniMap. Increasing beyond 256 may cause client lag. + Persist + 1 + Type + F32 + Value + 256.0 + MiniMapRotate Comment diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 9c607e0..6fa6745 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -626,11 +626,7 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U & LLVector3 local_pos; local_pos.setVec( pos - mObjectImageCenterGlobal ); - // DEV-17370 - megaprims of size > 4096 cause lag. (go figger.) - const F32 MAX_RADIUS = 256.0f; - F32 radius_clamped = llmin(radius_meters, MAX_RADIUS); - - S32 diameter_pixels = llround(2 * radius_clamped * mObjectMapTPM); + S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM); renderPoint( local_pos, color, diameter_pixels ); } diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index 78398bb..9ccbf99 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp @@ -1030,6 +1030,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) LLColor4 group_own_below_water_color = gColors.getColor( "NetMapGroupOwnBelowWater" ); + F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius"); for (S32 i = 0; i < mMapObjects.count(); i++) { @@ -1045,6 +1046,9 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) F32 approx_radius = (scale.mV[VX] + scale.mV[VY]) * 0.5f * 0.5f * 1.3f; // 1.3 is a fudge + // DEV-17370 - megaprims of size > 4096 cause lag. (go figger.) + approx_radius = llmin(approx_radius, max_radius); + LLColor4U color = above_water_color; if( objectp->permYouOwner() ) { -- cgit v1.1