PanteraPolnocy 2023-09-02 13:43:47 +02:00
commit 4992fdfe8e
6 changed files with 32 additions and 20 deletions

View File

@ -1068,7 +1068,10 @@ void LLAgent::capabilityReceivedCallback(const LLUUID &region_id, LLViewerRegion
if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360)
{
gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
// <FS:Beq> make this actually work
// gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360);
regionp->setInterestListMode(LLViewerRegion::IL_MODE_360);
// </FS:Beq>
}
}
}
@ -1124,6 +1127,14 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
{
regionp->requestSimulatorFeatures();
LLAppViewer::instance()->updateNameLookupUrl(regionp);
// <FS:Beq> move the interestlist update to a place where it is safe.
// Set the region to the desired interest list mode
if (getInterestListMode() == LLViewerRegion::IL_MODE_360)
{
changeInterestListMode(LLViewerRegion::IL_MODE_360);
regionp->setCapabilitiesReceivedCallback(LLAgent::capabilityReceivedCallback);
}
// </FS:Beq>
}
else
{
@ -3510,7 +3521,7 @@ void LLAgent::changeInterestListMode(const std::string &new_mode)
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;
LL_DEBUGS("360Capture") << "Setting Agent interest list mode to " << new_mode << " 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,

View File

@ -83,12 +83,18 @@ LLFloater360Capture::~LLFloater360Capture()
// Normally LLFloater360Capture tells the Simulator send everything
// and now reverts to the regular "keyhole" frustum of interest
// list updates.
if (!LLApp::isExiting() &&
// gSavedSettings.getBOOL("360CaptureUseInterestListCap") && // <FS:Beq/> Invalid dependency - This is not used anywhere else now.
mStartILMode != gAgent.getInterestListMode())
// <FS:Beq> This whole thing is wrong because it is not a simple before/after state states can overlap.
// if (!LLApp::isExiting() &&
// // 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);
// }
if ( !LLApp::isExiting() )
{
gAgent.set360CaptureActive(false); // <FS:Beq/> make FS Area search work again
gAgent.changeInterestListMode(mStartILMode);
gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT);// The Change Interest Mode target mode is indicative only. If something else is holding the 360 mode open then this will be ignored.
}
}

View File

@ -106,7 +106,6 @@
const S32 MAX_CAP_REQUEST_ATTEMPTS = 30;
const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000;
bool LLViewerRegion::sFSAreaSearchActive = false; // <FS:Beq/> FIRE-32688 Area Search improvements
BOOL LLViewerRegion::sVOCacheCullingEnabled = FALSE;
S32 LLViewerRegion::sLastCameraUpdated = 0;
S32 LLViewerRegion::sNewObjectCreationThrottle = -1;
@ -3541,8 +3540,10 @@ void LLViewerRegion::setCapabilitiesReceived(bool received)
// This is a single-shot signal. Forget callbacks to save resources.
mCapabilitiesReceivedSignal.disconnect_all_slots();
// Set the region to the desired interest list mode
setInterestListMode(gAgent.getInterestListMode());
// <FS:Beq> 360/AreaSearch fix - Move this to agent callback to avoid premature triggere with null region
// // Set the region to the desired interest list mode
// setInterestListMode(gAgent.getInterestListMode());
// </FS:Beq>
}
}

View File

@ -489,7 +489,6 @@ public:
std::vector<U32> mMapAvatars;
std::vector<LLUUID> mMapAvatarIDs;
static bool sFSAreaSearchActive; // <FS:Beq/> FIRE-32688 Area Search improvements
static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not.
static S32 sLastCameraUpdated;

View File

@ -35,6 +35,7 @@
#include "pipeline.h"
#include "llagentcamera.h"
#include "llmemory.h"
#include "llagent.h" // <FS:Beq/> For gAgent
//static variables
U32 LLVOCacheEntry::sMinFrameRange = 0;
@ -451,7 +452,7 @@ F32 LLVOCacheEntry::getSquaredPixelThreshold(bool is_front)
bool LLVOCacheEntry::isAnyVisible(const LLVector4a& camera_origin, const LLVector4a& local_camera_origin, F32 dist_threshold)
{
if( LLViewerRegion::sFSAreaSearchActive ) { return true; } // <FS:Beq/> FIRE-32688 Area Search improvements
if( gAgent.getFSAreaSearchActive() ) { return true; } // <FS:Beq/> FIRE-32688 Area Search improvements
LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)getGroup();
if(!group)
{
@ -948,10 +949,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
//process back objects selection
selectBackObjects(camera, LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull),
// <FS:Beq> FIRE-32688 Area Search improvements
// do_occlusion && use_object_cache_occlusion);
do_occlusion && use_object_cache_occlusion && !LLViewerRegion::sFSAreaSearchActive);
// </FS:Beq>
do_occlusion && use_object_cache_occlusion);
return 0; //nothing changed, reduce frequency of culling
}
}
@ -965,10 +963,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion)
camera.calcRegionFrustumPlanes(region_agent, gAgentCamera.mDrawDistance);
mFrontCull = TRUE;
// <FS:Beq> FIRE-32688 Area Search improvements
// LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, do_occlusion && use_object_cache_occlusion,
LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, do_occlusion && use_object_cache_occlusion && !LLViewerRegion::sFSAreaSearchActive,
// </FS:Beq>
LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, do_occlusion && use_object_cache_occlusion,
LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull), this);
culler.traverse(mOctree);

View File

@ -2592,7 +2592,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, LLPlane* pla
LLVOCachePartition* vo_part = region->getVOCachePartition();
if(vo_part)
{
bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe;
bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe && !gAgent.getFSAreaSearchActive();
vo_part->cull(camera, do_occlusion_cull);
}
}