From 5512a49a4d00da7a1bd75faee4fec738c1b02115 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Wed, 10 Sep 2025 12:57:09 +0200 Subject: [PATCH] Temporarily allow neighbouring regions to load during crossings when neighbour connections are disabled When debug setting to disable neighbouring regions is enabled, the viewer now makes an exception and function pauses itself while the avatar is physically out of bounds of the current region (negative pos, or pos bigger than max region size) indicating a possible region crossing (or grid error). This allows neighbouring regions to load during manual region crossings instead of leaving the user flying into the void. The option still prevents neighbour connections under normal circumstances as intended. However, with this adjustment, region crossings are at least partially possible in most cases, though still not as seamless as with full neighbour connections enabled. --- indra/newview/llworld.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 2d73045f72..fc6ca69c5f 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1599,9 +1599,17 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) if (fsDisableNeighbourRegionConnections) { LLViewerRegion* current_region = gAgent.getRegion(); - if (current_region && current_region->getHandle() != handle) + if (current_region) { - return; + F32 regionSize = current_region->getWidth(); + LLVector3 avPos = gAgent.getPositionAgent(); + if (avPos.mV[VX] >= 0 && avPos.mV[VX] <= regionSize && avPos.mV[VY] >= 0 && avPos.mV[VY] <= regionSize) + { + if (current_region->getHandle() != handle) + { + return; + } + } } } //