Feature Request: Add MiniMapPrimMaxAltitudeDelta and MiniMapPrimMaxAltitudeDeltaOwn to debug settings for users to configure how much altitude difference prims can have to be shown on the minimap
This commit is contained in:
@@ -10041,6 +10041,28 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
|
<key>MiniMapPrimMaxAltitudeDelta</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Max allowed altitude difference between your avatar and prims others own for them to be displayed on the minimap (0 means unlimited).</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>U32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<real>256</real>
|
||||||
|
</map>
|
||||||
|
<key>MiniMapPrimMaxAltitudeDeltaOwn</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Max allowed altitude difference between your avatar and prims you own for them to be displayed on the minimap (0 means unlimited).</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>U32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<real>0</real>
|
||||||
|
</map>
|
||||||
<key>MiniMapPrimMaxRadius</key>
|
<key>MiniMapPrimMaxRadius</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -1714,8 +1714,8 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
|||||||
|
|
||||||
F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
|
F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
|
||||||
|
|
||||||
static const F32 MAX_ALTITUDE_ABOVE_SELF = 256.f;
|
const F32 agent_altitude(gAgent.getPositionGlobal()[VZ]);
|
||||||
F32 max_altitude = gAgent.getPositionGlobal()[VZ] + MAX_ALTITUDE_ABOVE_SELF;
|
static const LLCachedControl<U32> delta("MiniMapPrimMaxAltitudeDelta");
|
||||||
|
|
||||||
for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter)
|
for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter)
|
||||||
{
|
{
|
||||||
@@ -1743,6 +1743,10 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
|||||||
LLColor4U color = above_water_color;
|
LLColor4U color = above_water_color;
|
||||||
if( objectp->permYouOwner() )
|
if( objectp->permYouOwner() )
|
||||||
{
|
{
|
||||||
|
static const LLCachedControl<U32> delta("MiniMapPrimMaxAltitudeDeltaOwn");
|
||||||
|
if (delta && static_cast<U32>(std::fabs(agent_altitude - pos[VZ])) > delta)
|
||||||
|
continue;
|
||||||
|
|
||||||
const F32 MIN_RADIUS_FOR_OWNED_OBJECTS = 2.f;
|
const F32 MIN_RADIUS_FOR_OWNED_OBJECTS = 2.f;
|
||||||
if( approx_radius < MIN_RADIUS_FOR_OWNED_OBJECTS )
|
if( approx_radius < MIN_RADIUS_FOR_OWNED_OBJECTS )
|
||||||
{
|
{
|
||||||
@@ -1772,7 +1776,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( pos[VZ] > max_altitude )
|
else if (delta && static_cast<U32>(std::fabs(agent_altitude - pos[VZ])) > delta)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user