diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3a76db24af..d3c4e3f57c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26982,5 +26982,16 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSDisableNeighbourRegionConnections + + Comment + Do not connect to neighbouring regions, only to the current region (limits region crossing) - experimental + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index bf1b71825a..59e27956a1 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -610,6 +610,14 @@ void LLWebRTCVoiceClient::updateNeighboringRegions() // add current region. mNeighboringRegions.insert(gAgent.getRegion()->getRegionID()); + // Do not connect to neighbouring regions + static LLCachedControl fsDisableNeighbourRegionConnections(gSavedSettings, "FSDisableNeighbourRegionConnections"); + if (fsDisableNeighbourRegionConnections) + { + return; + } + // + // base off of speaker position as it'll move more slowly than camera position. // Once we have hysteresis, we may be able to track off of speaker and camera position at 50m // TODO: Add hysteresis so we don't flip-flop connections to neighbors diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index cd2b666613..2d73045f72 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1594,6 +1594,18 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) msg->getIPAddrFast(_PREHASH_SimulatorInfo, _PREHASH_IP, ip_u32); msg->getIPPortFast(_PREHASH_SimulatorInfo, _PREHASH_Port, port); + // Only connect if neighbour connections are not disabled, or if this is the current region being established (login/teleport target) + static LLCachedControl fsDisableNeighbourRegionConnections(gSavedSettings, "FSDisableNeighbourRegionConnections"); + if (fsDisableNeighbourRegionConnections) + { + LLViewerRegion* current_region = gAgent.getRegion(); + if (current_region && current_region->getHandle() != handle) + { + return; + } + } + // + // which simulator should we modify? LLHost sim(ip_u32, port);