[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:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user