Add AlchemyConnectToNeighbors

This commit is contained in:
Inusaito Sayori
2014-07-13 19:43:00 -04:00
parent db75cb3e17
commit c1cc9d484a
2 changed files with 19 additions and 0 deletions

View File

@@ -102,6 +102,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>AlchemyConnectToNeighbors</key>
<map>
<key>Comment</key>
<string>If false, disconnect from neighboring regions and all further neighbors on teleport</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AlchemyLookAtLines</key>
<map>
<key>Comment</key>

View File

@@ -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<bool> 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;