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:
@@ -1714,8 +1714,8 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
|
||||
|
||||
F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
|
||||
|
||||
static const F32 MAX_ALTITUDE_ABOVE_SELF = 256.f;
|
||||
F32 max_altitude = gAgent.getPositionGlobal()[VZ] + MAX_ALTITUDE_ABOVE_SELF;
|
||||
const F32 agent_altitude(gAgent.getPositionGlobal()[VZ]);
|
||||
static const LLCachedControl<U32> delta("MiniMapPrimMaxAltitudeDelta");
|
||||
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user