[Radar] Add a debug setting RadarRangeRadius to limit how far away avatars showing up on radar can be (0, the default, is unlimited)

This commit is contained in:
Lirusaito
2013-07-20 23:16:29 -04:00
parent 2d55b1ab1c
commit 6fb68b4913
2 changed files with 13 additions and 1 deletions

View File

@@ -6964,6 +6964,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RadarRangeRadius</key>
<map>
<key>Comment</key>
<string>How far away avatars on the radar can be, 0 for no limit</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0</real>
</map>
<key>RadarUpdateEnabled</key>
<map>
<key>Comment</key>

View File

@@ -554,7 +554,8 @@ void LLFloaterAvatarList::updateAvatarList()
std::vector<LLVector3d> positions;
LLVector3d mypos = gAgent.getPositionGlobal();
LLWorld::instance().getAvatars(&avatar_ids, &positions, mypos, F32_MAX);
static const LLCachedControl<F32> radar_range_radius("RadarRangeRadius", 0);
LLWorld::instance().getAvatars(&avatar_ids, &positions, mypos, radar_range_radius ? radar_range_radius : F32_MAX);
size_t i;
size_t count = avatar_ids.size();