diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index 40cc40656..8b827b23c 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -102,6 +102,17 @@ Value 1 + AlchemyConnectToNeighbors + + Comment + If false, disconnect from neighboring regions and all further neighbors on teleport + Persist + 1 + Type + Boolean + Value + 1 + AlchemyLookAtLines Comment diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 8dab3dbb9..8e1b1e4be 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1352,6 +1352,14 @@ static LLFastTimer::DeclareTimer FTM_ENABLE_SIMULATOR("Enable Sim"); void process_enable_simulator(LLMessageSystem *msg, void **user_data) { LLFastTimer t(FTM_ENABLE_SIMULATOR); + + if (!gAgent.getRegion()) + return; + + static const LLCachedControl connectToNeighbors(gSavedSettings, "AlchemyConnectToNeighbors"); + if (!connectToNeighbors && ((gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL) || (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE))) + return; + // enable the appropriate circuit for this simulator and // add its values into the gSimulator structure U64 handle;