summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorsimon <simon@lindenlab.com>2023-05-13 04:10:28 +0100
committersimon <simon@lindenlab.com>2023-05-13 04:10:28 +0100
commit81f1be67109885f98f649974022aa6d444dd633d (patch)
tree0f594c5fd7985baebc8acd3f52893e1675b57375 /indra/newview/llagent.cpp
parent4173cae02165e36d96638761f29bd6d00ac24ddc (diff)
sl-19676 - 360 Intereset list mode. Changed mode to be a string for
future expansion instead of a bool toggle
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp36
1 files changed, 21 insertions, 15 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 89d4df7caa..307f73fab4 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -401,7 +401,7 @@ LLAgent::LLAgent() :
mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mTeleportState(TELEPORT_NONE),
mRegionp(NULL),
- mUse360Mode(false),
+ mInterestListMode(LLViewerRegion::IL_MODE_DEFAULT),
mAgentOriginGlobal(),
mPositionGlobal(),
@@ -904,10 +904,9 @@ void LLAgent::capabilityReceivedCallback(const LLUUID &region_id, LLViewerRegion
LLAppViewer::instance()->updateNameLookupUrl(regionp);
}
- if (gAgent.getInterestList360Mode())
+ if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360)
{
- const bool use_360_mode = true;
- gAgent.changeInterestListMode(use_360_mode);
+ gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
}
}
}
@@ -2932,22 +2931,29 @@ void LLAgent::processMaturityPreferenceFromServer(const LLSD &result, U8 perferr
// (hopefully) small period of time while the full contents resolves.
// Pass in a flag to ask the simulator/interest list to "send everything" or
// not (the default mode)
-void LLAgent::changeInterestListMode(bool use_360_mode)
+void LLAgent::changeInterestListMode(const std::string &new_mode)
{
- mUse360Mode = use_360_mode;
-
- // Change interest list mode for all regions. If they are already set for the current mode,
- // the setting will have no effect.
- for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
- iter != LLWorld::getInstance()->getRegionList().end();
- ++iter)
+ if (new_mode != mInterestListMode)
{
- LLViewerRegion *regionp = *iter;
- if (regionp && regionp->isAlive() && regionp->capabilitiesReceived())
+ mInterestListMode = new_mode;
+
+ // Change interest list mode for all regions. If they are already set for the current mode,
+ // the setting will have no effect.
+ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+ iter != LLWorld::getInstance()->getRegionList().end();
+ ++iter)
{
- regionp->setInterestList360Mode(mUse360Mode);
+ LLViewerRegion *regionp = *iter;
+ if (regionp && regionp->isAlive() && regionp->capabilitiesReceived())
+ {
+ regionp->setInterestListMode(mInterestListMode);
+ }
}
}
+ else
+ {
+ LL_DEBUGS("360Capture") << "Agent interest list mode is already set to " << mInterestListMode << LL_ENDL;
+ }
}