From ba68d2e231700dad929a65e885129475821a77f5 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 24 Nov 2015 12:08:43 -0500 Subject: [PATCH 1/5] Remove duplicate windlightses --- .../windlight/skies/%252ACanimod.xml | 141 ------------------ .../%252AStarley%252A%20Settings%202.xml | 141 ------------------ .../skies/AnaLu%20%252Astudio%252A%205.xml | 141 ------------------ 3 files changed, 423 deletions(-) delete mode 100644 indra/newview/app_settings/windlight/skies/%252ACanimod.xml delete mode 100644 indra/newview/app_settings/windlight/skies/%252AStarley%252A%20Settings%202.xml delete mode 100644 indra/newview/app_settings/windlight/skies/AnaLu%20%252Astudio%252A%205.xml diff --git a/indra/newview/app_settings/windlight/skies/%252ACanimod.xml b/indra/newview/app_settings/windlight/skies/%252ACanimod.xml deleted file mode 100644 index d4e69e622..000000000 --- a/indra/newview/app_settings/windlight/skies/%252ACanimod.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - ambient - - 1.4699999094009399 - 1.4699999094009399 - 1.4699999094009399 - 0.48999997973442078 - - blue_density - - 0.099999994039535522 - 0.037499997764825821 - 0.067499987781047821 - 0.049999997019767761 - - blue_horizon - - 0.15130999684333801 - 0.30000001192092896 - 0.35131001472473145 - 1 - - cloud_color - - 0.22999998927116394 - 0.22999998927116394 - 0.22999998927116394 - 0.22999998927116394 - - cloud_pos_density1 - - 0.88419097661972046 - 0.53047597408294678 - 0.52999997138977051 - 1 - - cloud_pos_density2 - - 0.2800000011920929 - 0.19999998807907104 - 0.31999999284744263 - 1 - - cloud_scale - - 0.0099999997764825821 - 0 - 0 - 1 - - cloud_scroll_rate - - 0 - 15.329999446868896 - - cloud_shadow - - 0 - 0 - 0 - 1 - - density_multiplier - - 0.00022000000171829015 - 0 - 0 - 1 - - distance_multiplier - - 16.200000762939453 - 0 - 0 - 1 - - east_angle - 6.2831854820251465 - enable_cloud_scroll - - 1 - 1 - - gamma - - 1.4199999570846558 - 0 - 0 - 1 - - glow - - 18.599998474121094 - 0.0012815999798476696 - 0 - 1 - - haze_density - - 0 - 0 - 0 - 1 - - haze_horizon - - 1 - 0.21744099259376526 - 0.21744099259376526 - 1 - - lightnorm - - -1.7484555314695172e-007 - 0 - 1 - 0 - - max_y - - 403 - 0 - 0 - 1 - - preset_num - 2 - star_brightness - 0 - sun_angle - 0 - sunlight_color - - 0 - 0 - 0 - 0 - - - diff --git a/indra/newview/app_settings/windlight/skies/%252AStarley%252A%20Settings%202.xml b/indra/newview/app_settings/windlight/skies/%252AStarley%252A%20Settings%202.xml deleted file mode 100644 index 6d1c09d30..000000000 --- a/indra/newview/app_settings/windlight/skies/%252AStarley%252A%20Settings%202.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - ambient - - 1.4699999094009399 - 1.4699999094009399 - 1.4699999094009399 - 0.48999997973442078 - - blue_density - - 0.14000000059604645 - 0.14000000059604645 - 0.14000000059604645 - 0.070000000298023224 - - blue_horizon - - 0.83809572458267212 - 1.0735483169555664 - 1.2799999713897705 - 0.63999998569488525 - - cloud_color - - 0.12862999737262726 - 0.12862999737262726 - 0.12862999737262726 - 1 - - cloud_pos_density1 - - 0.70999997854232788 - 0.53047597408294678 - 0.4270470142364502 - 1 - - cloud_pos_density2 - - 0.38419300317764282 - 0.5 - 0.125 - 1 - - cloud_scale - - 0.72999995946884155 - 0 - 0 - 1 - - cloud_scroll_rate - - 10 - 10 - - cloud_shadow - - 0.2199999988079071 - 0 - 0 - 1 - - density_multiplier - - 0.00017999998817685992 - 0 - 0 - 1 - - distance_multiplier - - 11.40000057220459 - 0 - 0 - 1 - - east_angle - 0 - enable_cloud_scroll - - 1 - 1 - - gamma - - 1.6899999380111694 - 0 - 0 - 1 - - glow - - 6.4079799652099609 - 0.0012815999798476696 - -0.39999997615814209 - 1 - - haze_density - - 1.4900000095367432 - 0 - 0 - 1 - - haze_horizon - - 0 - 0.21744099259376526 - 0.21744099259376526 - 1 - - lightnorm - - 0 - 0 - 1 - 0 - - max_y - - 805 - 0 - 0 - 1 - - preset_num - 2 - star_brightness - 1.5699999332427979 - sun_angle - 0 - sunlight_color - - 3 - 3 - 3 - 1 - - - diff --git a/indra/newview/app_settings/windlight/skies/AnaLu%20%252Astudio%252A%205.xml b/indra/newview/app_settings/windlight/skies/AnaLu%20%252Astudio%252A%205.xml deleted file mode 100644 index b7c6d047f..000000000 --- a/indra/newview/app_settings/windlight/skies/AnaLu%20%252Astudio%252A%205.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - ambient - - 2.0099997520446777 - 1.9199999570846558 - 1.8899999856948853 - 2.0099997520446777 - - blue_density - - 0.63999998569488525 - 1.1799999475479126 - 2 - 2 - - blue_horizon - - 0.23999999463558197 - 0.23999999463558197 - 0.31999999284744263 - 0.31999999284744263 - - cloud_color - - 0.39050509865536398 - 0.39050509865536398 - 0.39050509865536398 - 0.39050509865536398 - - cloud_pos_density1 - - 1.6884100437164307 - 0.52609699964523315 - 1 - 1 - - cloud_pos_density2 - - 1.6884100437164307 - 0.52609699964523315 - 0.125 - 1 - - cloud_scale - - 0.41999998254906856 - 0 - 0 - 1 - - cloud_scroll_rate - - 10.199999735331062 - 10.010999579794088 - - cloud_shadow - - 0.12999999523162842 - 0 - 0 - 1 - - density_multiplier - - 0.00017999998391111764 - 0 - 0 - 1 - - distance_multiplier - - 2 - 0 - 0 - 1 - - east_angle - 0 - enable_cloud_scroll - - 1 - 1 - - gamma - - 1.1499999761581421 - 0 - 0 - 1 - - glow - - 4.9999998807907104 - 0.0010000000478643939 - -0.47999998436731417 - 1 - - haze_density - - 0.64999997615814209 - 0 - 0 - 1 - - haze_horizon - - 0.08999999612569809 - 0.19915600121021271 - 0.19915600121021271 - 1 - - lightnorm - - 0 - 0 - 1 - 0 - - max_y - - 188 - 0 - 0 - 1 - - preset_num - 22 - star_brightness - 0 - sun_angle - 0 - sunlight_color - - 2.5799999237060547 - 2.5799999237060547 - 2.5799999237060547 - 2.5799999237060547 - - - From e395d2fdf853c9e3ab430c3f564a396005393d4f Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 26 Nov 2015 08:47:15 -0500 Subject: [PATCH 2/5] [Radar] Fix the "people not being removed from radar" problem We'll now make sure expired avatars are not elsewhere in the world(a different visible region) when we remove them View without space changes. --- indra/newview/llfloateravatarlist.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index a1d17ddad..7c8d729cf 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -509,6 +509,11 @@ void updateParticleActivity(LLDrawable *drawablep) } } +const F32& radar_range_radius() +{ + static const LLCachedControl radius("RadarRangeRadius", 0); + return radius; +} void LLFloaterAvatarList::updateAvatarList(const LLViewerRegion* region) { // Check whether updates are enabled @@ -523,8 +528,7 @@ void LLFloaterAvatarList::updateAvatarList(const LLViewerRegion* region) const std::vector& map_avids(region->mMapAvatarIDs); const LLVector3d& mypos(gAgent.getPositionGlobal()); const LLVector3d& origin(region->getOriginGlobal()); - static const LLCachedControl radar_range_radius("RadarRangeRadius", 0); - const F32 max_range(radar_range_radius * radar_range_radius); + const F32 max_range(radar_range_radius() * radar_range_radius()); static LLCachedControl announce(gSavedSettings, "RadarChatKeys"); std::queue announce_keys; @@ -594,14 +598,20 @@ void LLFloaterAvatarList::updateAvatarList(const LLViewerRegion* region) void LLFloaterAvatarList::expireAvatarList(const std::list& ids) { - BOOST_FOREACH(const LLUUID& id, ids) + if (!ids.empty()) { - av_list_t::iterator it(std::find_if(mAvatars.begin(), mAvatars.end(), LLAvatarListEntry::uuidMatch(id))); - if (it != mAvatars.end()) + std::vector existing_avs; + LLWorld::instance().getAvatars(&existing_avs, NULL, gAgent.getPositionGlobal(), radar_range_radius()); + BOOST_FOREACH(const LLUUID& id, ids) { - LLAvatarListEntry* entry = it->get(); - entry->setPosition(entry->getPosition(), F32_MIN, false); // Dead and gone - mAvatars.erase(it); + if (std::find(existing_avs.begin(), existing_avs.end(), id) != existing_avs.end()) continue; // Now in another region we know. + av_list_t::iterator it(std::find_if(mAvatars.begin(), mAvatars.end(), id)); + if (it != mAvatars.end()) + { + LLAvatarListEntry* entry = it->get(); + entry->setPosition(entry->getPosition(), F32_MIN, false); // Dead and gone + mAvatars.erase(it); + } } } From aa250836f6e75365278d8951f671b89f1a22af8a Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 26 Nov 2015 09:25:38 -0500 Subject: [PATCH 3/5] [Radar] Fix title not updating properly all the time --- indra/newview/llfloateravatarlist.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 7c8d729cf..27e370fc3 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -615,17 +615,6 @@ void LLFloaterAvatarList::expireAvatarList(const std::list& ids) } } - if (mAvatars.empty()) - setTitle(getString("Title")); - else if (mAvatars.size() == 1) - setTitle(getString("TitleOneAvatar")); - else - { - LLStringUtil::format_map_t args; - args["[COUNT]"] = boost::lexical_cast(mAvatars.size()); - setTitle(getString("TitleWithCount", args)); - } - refreshAvatarList(); refreshTracker(); } @@ -658,9 +647,20 @@ bool getCustomColorRLV(const LLUUID& id, LLColor4& color, LLViewerRegion* parent */ void LLFloaterAvatarList::refreshAvatarList() { - // Don't update list when interface is hidden + // Don't update when interface is hidden if (!getVisible()) return; + if (mAvatars.empty()) + setTitle(getString("Title")); + else if (mAvatars.size() == 1) + setTitle(getString("TitleOneAvatar")); + else + { + LLStringUtil::format_map_t args; + args["[COUNT]"] = boost::lexical_cast(mAvatars.size()); + setTitle(getString("TitleWithCount", args)); + } + // We rebuild the list fully each time it's refreshed // The assumption is that it's faster to refill it and sort than // to rebuild the whole list. From 3b7f801f90cb8c41db42630c2973ffdf6716c55e Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sun, 17 Jan 2016 02:28:55 -0500 Subject: [PATCH 4/5] [Radar] The final touches to make the title updating work perfectly Special thanks to Mika-Pyon! --- indra/newview/llfloateravatarlist.cpp | 47 ++++++++++++++++----------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 27e370fc3..109de7291 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -145,6 +145,7 @@ LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string& name, LLAvatarListEntry::~LLAvatarListEntry() { + setPosition(mPosition, F32_MIN, false); // Dead and gone LLAvatarPropertiesProcessor::instance().removeObserver(mID, this); } @@ -268,7 +269,7 @@ void LLFloaterAvatarList::draw() void LLFloaterAvatarList::onOpen() { - if (mAvatars.size()) refreshAvatarList(); + refreshAvatarList(); } void LLFloaterAvatarList::onClose(bool app_quitting) @@ -514,6 +515,7 @@ const F32& radar_range_radius() static const LLCachedControl radius("RadarRangeRadius", 0); return radius; } + void LLFloaterAvatarList::updateAvatarList(const LLViewerRegion* region) { // Check whether updates are enabled @@ -601,17 +603,16 @@ void LLFloaterAvatarList::expireAvatarList(const std::list& ids) if (!ids.empty()) { std::vector existing_avs; - LLWorld::instance().getAvatars(&existing_avs, NULL, gAgent.getPositionGlobal(), radar_range_radius()); + std::vector neighbors; + gAgent.getRegion()->getNeighboringRegions(neighbors); + BOOST_FOREACH(const LLViewerRegion* region, neighbors) + existing_avs.insert(existing_avs.end(), region->mMapAvatarIDs.begin(), region->mMapAvatarIDs.end()); BOOST_FOREACH(const LLUUID& id, ids) { if (std::find(existing_avs.begin(), existing_avs.end(), id) != existing_avs.end()) continue; // Now in another region we know. - av_list_t::iterator it(std::find_if(mAvatars.begin(), mAvatars.end(), id)); + av_list_t::iterator it(std::find_if(mAvatars.begin(), mAvatars.end(), LLAvatarListEntry::uuidMatch(id))); if (it != mAvatars.end()) - { - LLAvatarListEntry* entry = it->get(); - entry->setPosition(entry->getPosition(), F32_MIN, false); // Dead and gone mAvatars.erase(it); - } } } @@ -650,17 +651,6 @@ void LLFloaterAvatarList::refreshAvatarList() // Don't update when interface is hidden if (!getVisible()) return; - if (mAvatars.empty()) - setTitle(getString("Title")); - else if (mAvatars.size() == 1) - setTitle(getString("TitleOneAvatar")); - else - { - LLStringUtil::format_map_t args; - args["[COUNT]"] = boost::lexical_cast(mAvatars.size()); - setTitle(getString("TitleWithCount", args)); - } - // We rebuild the list fully each time it's refreshed // The assumption is that it's faster to refill it and sort than // to rebuild the whole list. @@ -679,6 +669,7 @@ void LLFloaterAvatarList::refreshAvatarList() localRectToScreen(getLocalRect(), &screen_rect); speakermgr.update(!(screen_rect.pointInRect(gViewerWindow->getCurrentMouseX(), gViewerWindow->getCurrentMouseY()) && gMouseIdleTimer.getElapsedTimeF32() < 5.f)); + av_list_t dead_entries; bool name_restricted(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); BOOST_FOREACH(av_list_t::value_type& entry, mAvatars) { @@ -694,7 +685,11 @@ void LLFloaterAvatarList::refreshAvatarList() //jcool410 -- this fucks up seeing dueds thru minimap data > 1024m away, so, lets just say > 2048m to the side is bad //aka 8 sims - if (delta.magVec() > 2048.0) continue; + if (delta.magVec() > 2048.0) + { + dead_entries.push_back(entry); + continue; + } entry->setInList(); const LLUUID& av_id = entry->getID(); @@ -979,6 +974,20 @@ void LLFloaterAvatarList::refreshAvatarList() mAvatarList->addRow(element); } + BOOST_FOREACH(av_list_t::value_type& dead, dead_entries) + mAvatars.erase(std::remove(mAvatars.begin(), mAvatars.end(), dead), mAvatars.end()); + + if (mAvatars.empty()) + setTitle(getString("Title")); + else if (mAvatars.size() == 1) + setTitle(getString("TitleOneAvatar")); + else + { + LLStringUtil::format_map_t args; + args["[COUNT]"] = boost::lexical_cast(mAvatars.size()); + setTitle(getString("TitleWithCount", args)); + } + // finish mAvatarList->updateSort(); mAvatarList->selectMultiple(selected); From 422db14725a48ba39081715e256b654bb4fc3b5c Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Sun, 17 Jan 2016 23:55:19 -0500 Subject: [PATCH 5/5] Fix more warnings --- indra/newview/llagentwearables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index dfed2502c..dff462286 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1464,7 +1464,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it } #endif // If we got here, everything matches. - matched++; + //matched++; // TODO: Find out why this was here, this became unreachable at some point. } LL_DEBUGS("Avatar") << "matched " << matched << " mismatched " << mismatched << LL_ENDL; for (S32 j=0; j