diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 37bfc2af77989cd3a07730dd1322e0ca87927657..a23baed1533df0f8114930d4b7447c0ace7f98cb 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -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 diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index bd6afd5822dfc7ca5f9bfb50167bf452a0259f43..33a790361da5337685a30a346c3c0ddbcda27da4 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -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"