diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 8851c34826..e6a2d88ada 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -2017,6 +2017,9 @@ void LLAudioEngine::markSoundCorrupt( LLUUID const &aId ) bool LLAudioEngine::isCorruptSound( LLUUID const &aId ) const { + if (this == nullptr) + return true; + std::map::const_iterator itr = mCorruptData.find( aId ); if( mCorruptData.end() == itr ) return false; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ae372713a0..fabd2dfbf0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2,6 +2,28 @@ + FSTrishMouseLookFix + + Comment + Fixes touch in mouselook while cam is controlled. Can break some poorly scripted weapons. + Persist + 1 + Type + Boolean + Value + 1 + + FSTrishNeighboringRegionLoadAdjacentsFix + + Comment + Fixes crossing for the experimental blockage of neighboring sims by only loading adjacent sims - EXPERIMENTAL. + Persist + 1 + Type + Boolean + Value + 1 + FSLandmarkCreatedNotification Comment diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index e89b2bc55b..0ffa264791 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4111,7 +4111,19 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global) bool LLAgent::leftButtonGrabbed() const { + static LLCachedControl fsTrishMouseLookFix(gSavedSettings, "FSTristMouseLookFix"); const bool camera_mouse_look = gAgentCamera.cameraMouselook(); + + if (fsTrishMouseLookFix) + { + if (camera_mouse_look) + { + return mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0; + } + + return mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0 + } + return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) || (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0) || (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index fc6ca69c5f..45a18c84d9 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1642,6 +1642,37 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) LLWorld::getInstance()->addRegion(handle, sim, region_size_x, region_size_y); // Aurora Sim + // Remove region if it wasn't a neighbor + static LLCachedControl fsTrishNeighboringRegionLoadAdjacentsFix(gSavedSettings, "FSTrishNeighboringRegionLoadAdjacentsFix"); + if (fsTrishNeighboringRegionLoadAdjacentsFix) + { + LLViewerRegion* current_region = gAgent.getRegion(); + std::vector uniqueRegions; + current_region->getNeighboringRegions(uniqueRegions); + + bool found = false; + for (LLViewerRegion* r : uniqueRegions) + { + if (r && r->getHandle() == handle) + { + found = true; + break; + } + } + + if (!found) + { + LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromHandle(handle); + if (pRegion) + { + LLWorld::getInstance()->removeRegion(pRegion->getHost()); + LL_INFOS() << "Region is not a neighbor, connection aborted." << LL_ENDL; + return; + } + } + } + // Remove region if it wasn't a neighbor + // give the simulator a message it can use to get ip and port LL_INFOS() << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << LL_ENDL; msg->newMessageFast(_PREHASH_UseCircuitCode);