summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-02-22 00:02:25 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-02-22 01:32:14 +0200
commit3d1445013337068960b31b4a648bf5df17d01341 (patch)
treec93cd8f87e7a840aad5a5debc258683815f0a652
parent7704c26354a00d4979eef2456a86e88ebd2580c3 (diff)
triage#100 Fix invalid interest mode
Agent needs these strings before values were initialized so made values a bit more global.
-rw-r--r--indra/newview/llagent.cpp6
-rw-r--r--indra/newview/llfloater360capture.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp8
-rwxr-xr-xindra/newview/llviewerregion.cpp5
-rw-r--r--indra/newview/llviewerregion.h8
5 files changed, 14 insertions, 15 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 4d8ba3fff2..fb0d3bd58c 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -405,7 +405,7 @@ LLAgent::LLAgent() :
mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mTeleportState(TELEPORT_NONE),
mRegionp(NULL),
- mInterestListMode(LLViewerRegion::IL_MODE_DEFAULT),
+ mInterestListMode(IL_MODE_DEFAULT),
mAgentOriginGlobal(),
mPositionGlobal(),
@@ -999,9 +999,9 @@ void LLAgent::capabilityReceivedCallback(const LLUUID &region_id, LLViewerRegion
LLAppViewer::instance()->updateNameLookupUrl(regionp);
}
- if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360)
+ if (gAgent.getInterestListMode() == IL_MODE_360)
{
- gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
+ gAgent.changeInterestListMode(IL_MODE_360);
}
}
}
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index ce8e4b4452..d5efc15e35 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -67,7 +67,7 @@ LLFloater360Capture::LLFloater360Capture(const LLSD& key)
mStartILMode = gAgent.getInterestListMode();
// send everything to us for as long as this floater is open
- gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
+ gAgent.changeInterestListMode(IL_MODE_360);
}
LLFloater360Capture::~LLFloater360Capture()
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 591e60da44..2415402ebd 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1262,13 +1262,13 @@ public:
bool handleEvent(const LLSD &userdata)
{
// Toggle the mode - regions will get updated
- if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360)
+ if (gAgent.getInterestListMode() == IL_MODE_360)
{
- gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT);
+ gAgent.changeInterestListMode(IL_MODE_DEFAULT);
}
else
{
- gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
+ gAgent.changeInterestListMode(IL_MODE_360);
}
return true;
}
@@ -1278,7 +1278,7 @@ class LLAdvancedCheckInterestList360Mode : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- return (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360);
+ return (gAgent.getInterestListMode() == IL_MODE_360);
}
};
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 4621ed7ec1..67f88285ca 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -105,9 +105,6 @@ S32 LLViewerRegion::sLastCameraUpdated = 0;
S32 LLViewerRegion::sNewObjectCreationThrottle = -1;
LLViewerRegion::vocache_entry_map_t LLViewerRegion::sRegionCacheCleanup;
-const std::string LLViewerRegion::IL_MODE_DEFAULT = "default";
-const std::string LLViewerRegion::IL_MODE_360 = "360";
-
typedef std::map<std::string, std::string> CapabilityMap;
static void log_capabilities(const CapabilityMap &capmap);
@@ -3438,7 +3435,7 @@ void LLViewerRegion::setInterestListMode(const std::string &new_mode)
{
mInterestListMode = new_mode;
- if (mInterestListMode != std::string(IL_MODE_DEFAULT) && mInterestListMode != std::string(IL_MODE_360))
+ if (mInterestListMode != IL_MODE_DEFAULT && mInterestListMode != IL_MODE_360)
{
LL_WARNS("360Capture") << "Region " << getRegionID() << " setInterestListMode() invalid interest list mode: "
<< mInterestListMode << ", setting to default" << LL_ENDL;
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index be12cf032d..2fb313b60c 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -52,6 +52,11 @@ const U32 MAX_OBJECT_CACHE_ENTRIES = 50000;
// Region handshake flags
const U32 REGION_HANDSHAKE_SUPPORTS_SELF_APPEARANCE = 1U << 2;
+// Interest list mode,
+// in use by agent and region classes so must exist before region classes
+const std::string IL_MODE_DEFAULT = "default";
+const std::string IL_MODE_360 = "360";
+
class LLEventPoll;
class LLVLComposition;
class LLViewerObject;
@@ -505,9 +510,6 @@ public:
void resetInterestList();
- static const std::string IL_MODE_DEFAULT;
- static const std::string IL_MODE_360;
-
private:
static S32 sNewObjectCreationThrottle;
LLViewerRegionImpl * mImpl;