diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp
index b81a20454f..b3ecf75951 100644
--- a/indra/newview/fsareasearch.cpp
+++ b/indra/newview/fsareasearch.cpp
@@ -173,7 +173,8 @@ FSAreaSearch::FSAreaSearch(const LLSD& key) :
mRequestNeedsSent(false),
mRlvBehaviorCallbackConnection()
{
- LLViewerRegion::sFSAreaSearchActive = true;
+ gAgent.setFSAreaSearchActive(true);
+ gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
mFactoryMap["area_search_list_panel"] = LLCallbackMap(createPanelList, this);
mFactoryMap["area_search_find_panel"] = LLCallbackMap(createPanelFind, this);
mFactoryMap["area_search_filter_panel"] = LLCallbackMap(createPanelFilter, this);
@@ -189,7 +190,16 @@ FSAreaSearch::FSAreaSearch(const LLSD& key) :
FSAreaSearch::~FSAreaSearch()
{
- LLViewerRegion::sFSAreaSearchActive = false;
+ gAgent.setFSAreaSearchActive(false);
+
+ // Tell the Simulator not to send us everything anymore
+ // and revert to the regular "keyhole" frustum of interest
+ // list updates.
+ if( !LLApp::isExiting() )
+ {
+ gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT);
+ }
+
if (!gIdleCallbacks.deleteFunction(idle, this))
{
LL_WARNS("FSAreaSearch") << "FSAreaSearch::~FSAreaSearch() failed to delete callback" << LL_ENDL;
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 754b991642..cf4dc5c8cd 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3506,8 +3506,13 @@ void LLAgent::changeInterestListMode(const std::string &new_mode)
{
if (new_mode != mInterestListMode)
{
+ // Fix area search again
+ if ( (new_mode == LLViewerRegion::IL_MODE_DEFAULT && (!mFSAreaSearchActive && !m360CaptureActive)) ||
+ (new_mode == LLViewerRegion::IL_MODE_360) )
+ {
+ LL_DEBUGS("360Capture") << "Setting Agent interest list mode to " << mInterestListMode << " and updating regions" << LL_ENDL;
+ //
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();
@@ -3520,6 +3525,7 @@ void LLAgent::changeInterestListMode(const std::string &new_mode)
regionp->setInterestListMode(mInterestListMode);
}
}
+ } //
}
else
{
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index d21eedb66a..a0e1540609 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -307,6 +307,10 @@ private:
region_changed_signal_t mRegionChangedSignal;
std::string mInterestListMode; // How agent wants regions to send updates
+ // Area search fixes
+ bool mFSAreaSearchActive;
+ bool m360CaptureActive;
+ //
//--------------------------------------------------------------------
// History
@@ -315,6 +319,12 @@ public:
S32 getRegionsVisited() const;
F64 getDistanceTraveled() const;
void setDistanceTraveled(F64 dist) { mDistanceTraveled = dist; }
+ // Area search fixes
+ void setFSAreaSearchActive(BOOL enabled) { mFSAreaSearchActive = enabled; }
+ void set360CaptureActive(BOOL enabled) { m360CaptureActive = enabled; }
+ bool getFSAreaSearchActive() { return mFSAreaSearchActive; }
+ bool get360CaptureActive() { return m360CaptureActive; }
+ //
const LLVector3d &getLastPositionGlobal() const { return mLastPositionGlobal; }
void setLastPositionGlobal(const LLVector3d &pos) { mLastPositionGlobal = pos; }
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index e79535f498..30551da3ea 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -65,7 +65,7 @@ LLFloater360Capture::LLFloater360Capture(const LLSD& key)
// otherwise, exit before this is turned off, the Simulator
// will take care of cleaning up for us.
mStartILMode = gAgent.getInterestListMode();
-
+ gAgent.set360CaptureActive(true); // make FS area search work aga
// send everything to us for as long as this floater is open
gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
}
@@ -84,11 +84,12 @@ LLFloater360Capture::~LLFloater360Capture()
// and now reverts to the regular "keyhole" frustum of interest
// list updates.
if (!LLApp::isExiting() &&
- gSavedSettings.getBOOL("360CaptureUseInterestListCap") &&
+ // gSavedSettings.getBOOL("360CaptureUseInterestListCap") && // Invalid dependency - This is not used anywhere else now.
mStartILMode != gAgent.getInterestListMode())
{
+ gAgent.set360CaptureActive(false); // make FS Area search work again
gAgent.changeInterestListMode(mStartILMode);
- }
+ }
}
BOOL LLFloater360Capture::postBuild()
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2e7f30f985..274192aecc 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1491,10 +1491,17 @@ public:
// Toggle the mode - regions will get updated
if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360)
{
+ // we need to force the 360 mode "users" to false or this override will fail
+ gAgent.setFSAreaSearchActive(false);
+ gAgent.set360CaptureActive(false);
+ //
gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT);
}
else
{
+ // we need to force the 360 mode user flag to true or this override will fail. Don;t set area search though as that can have other effects.
+ gAgent.set360CaptureActive(false);
+ //
gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
}
return true;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 1cfc8629da..14773e147f 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1736,6 +1736,7 @@ BOOL LLViewerRegion::isViewerCameraStatic()
void LLViewerRegion::killInvisibleObjects(F32 max_time)
{
+ if(gAgent.getFSAreaSearchActive()){ return; } // FIRE-32668 Area Search improvements (again)
if(!sVOCacheCullingEnabled)
{
return;