Make area search work again again

master
Beq 2023-08-30 22:43:24 +01:00
parent b7b87c7aaa
commit cbf5f5a4d3
6 changed files with 41 additions and 6 deletions

View File

@ -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;

View File

@ -3506,8 +3506,13 @@ void LLAgent::changeInterestListMode(const std::string &new_mode)
{
if (new_mode != mInterestListMode)
{
// <FS:Beq> 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;
// </FS:Beq>
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);
}
}
} // <FS:Beq/>
}
else
{

View File

@ -307,6 +307,10 @@ private:
region_changed_signal_t mRegionChangedSignal;
std::string mInterestListMode; // How agent wants regions to send updates
// <FS:Beq> Area search fixes
bool mFSAreaSearchActive;
bool m360CaptureActive;
// </FS:Beq>
//--------------------------------------------------------------------
// History
@ -315,6 +319,12 @@ public:
S32 getRegionsVisited() const;
F64 getDistanceTraveled() const;
void setDistanceTraveled(F64 dist) { mDistanceTraveled = dist; }
// <FS:Beq> Area search fixes
void setFSAreaSearchActive(BOOL enabled) { mFSAreaSearchActive = enabled; }
void set360CaptureActive(BOOL enabled) { m360CaptureActive = enabled; }
bool getFSAreaSearchActive() { return mFSAreaSearchActive; }
bool get360CaptureActive() { return m360CaptureActive; }
// </FS:Beq>
const LLVector3d &getLastPositionGlobal() const { return mLastPositionGlobal; }
void setLastPositionGlobal(const LLVector3d &pos) { mLastPositionGlobal = pos; }

View File

@ -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); // <FS:Beq/> 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") && // <FS:Beq/> Invalid dependency - This is not used anywhere else now.
mStartILMode != gAgent.getInterestListMode())
{
gAgent.set360CaptureActive(false); // <FS:Beq/> make FS Area search work again
gAgent.changeInterestListMode(mStartILMode);
}
}
}
BOOL LLFloater360Capture::postBuild()

View File

@ -1491,10 +1491,17 @@ public:
// Toggle the mode - regions will get updated
if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360)
{
// <FS:Beq> we need to force the 360 mode "users" to false or this override will fail
gAgent.setFSAreaSearchActive(false);
gAgent.set360CaptureActive(false);
// <FS:Beq/>
gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT);
}
else
{
// <FS:Beq> 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);
// <FS:Beq/>
gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
}
return true;

View File

@ -1736,6 +1736,7 @@ BOOL LLViewerRegion::isViewerCameraStatic()
void LLViewerRegion::killInvisibleObjects(F32 max_time)
{
if(gAgent.getFSAreaSearchActive()){ return; } // <FS:Beq/> FIRE-32668 Area Search improvements (again)
if(!sVOCacheCullingEnabled)
{
return;