Add a switch to not connect to neighbouring regions
- An experimental and not officially supported function (therefore not exposed in preferences), may or may not stay in the source; Potentially addresses FIRE-2325 and its duplicates - Prevents the viewer from connecting to neighbouring regions. When enabled, only the current region (login/teleport destination) is connected, while adjacent simulators are ignored. This effectively isolates the region, similar to how private estates behave. - This may improve performance for users with weaker computers or slower connections, reduce unintended neighbour interactions, and assist multi-region event setups by lowering client overhead. It can also be useful for residents who prefer not to see or interact with neighbouring land. - Limitations: region crossings will not function normally, as neighbouring regions are not visible or connected. Only direct teleports and logins to regions will work reliably. The sense of world scale and continuity is reduced, and travellers or explorers may find it unsuitable. - TO-DO: Detect when avatar is crossing by foot/vehicle and load only that one region? - I was not able to find an equivalent of WebRTC's updateNeighboringRegions() in Vivox code; updatePosition() is not that helpful, and channelFromRegion() seems to be detached?master
parent
8c97193db9
commit
7766a98d11
|
|
@ -26982,5 +26982,16 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSDisableNeighbourRegionConnections</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Do not connect to neighbouring regions, only to the current region (limits region crossing) - experimental</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -610,6 +610,14 @@ void LLWebRTCVoiceClient::updateNeighboringRegions()
|
|||
// add current region.
|
||||
mNeighboringRegions.insert(gAgent.getRegion()->getRegionID());
|
||||
|
||||
// <FS:PP> Do not connect to neighbouring regions
|
||||
static LLCachedControl<bool> fsDisableNeighbourRegionConnections(gSavedSettings, "FSDisableNeighbourRegionConnections");
|
||||
if (fsDisableNeighbourRegionConnections)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
// <FS:PP> Only connect if neighbour connections are not disabled, or if this is the current region being established (login/teleport target)
|
||||
static LLCachedControl<bool> fsDisableNeighbourRegionConnections(gSavedSettings, "FSDisableNeighbourRegionConnections");
|
||||
if (fsDisableNeighbourRegionConnections)
|
||||
{
|
||||
LLViewerRegion* current_region = gAgent.getRegion();
|
||||
if (current_region && current_region->getHandle() != handle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
// which simulator should we modify?
|
||||
LLHost sim(ip_u32, port);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue