Skip to content
Snippets Groups Projects
Commit 33a527dd authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files
parents 152ce1e4 95680620
No related branches found
No related tags found
No related merge requests found
......@@ -894,13 +894,30 @@ void LLPanelPeople::updateNearbyList()
// [/RLVa:KB]
LLWorld::getInstance()->getAvatars(&mNearbyList->getIDs(), &positions, gAgent.getPositionGlobal(), ALControlCache::NearMeRange);
int count_in_region = 0;
LLViewerRegion* cur_region = gAgent.getRegion();
mNearbyCountText->setTextArg("[COUNT]", std::to_string(mNearbyList->size()));
if (cur_region)
if (!cur_region)
{
LL_WARNS() << "Current region is null" << LL_ENDL;
return;
}
// Iterate through avatars in the region.
// The nearby list reports the avatars in 4096m range (ALControlCache::NearMeRange)
// Reported UUIDs may not be in same region.
// Also the TOTAL changes based on your filter results --FLN
for (size_t i = 0; i < positions.size(); ++i)
{
mNearbyCountText->setTextArg("[REGION]", cur_region->getName());
if (cur_region->pointInRegionGlobal(positions[i]))
{
count_in_region++;
}
}
mNearbyCountText->setTextArg("[TOTAL]", std::to_string(mNearbyList->size()));
mNearbyCountText->setTextArg("[COUNT]", std::to_string(count_in_region));
mNearbyCountText->setTextArg("[REGION]", RlvActions::canShowLocation() ? cur_region->getName() : "[REDACTED]");
// [RLVa:KB] - Checked: RLVa-2.0.3
}
else
......
......@@ -184,7 +184,7 @@ Learn about [https://community.secondlife.com/knowledgebase/joining-and-particip
use_ellipses="true"
skip_link_underline="true"
name="nearbycount">
There are [COUNT] avatars in [REGION].
There are [TOTAL] avatars total and [COUNT] in [REGION].
</text>
<layout_stack
clip="false"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment