[STORM-1980] Singu Special: Emergency Teleport out of region within last 20 seconds before restart
Look in System preferences under the Security tab, at the bottom. Debug setting is EmergencyTeleportLandmark, reset to turn off. Also, thanks to everyone in Fluffy who put up with the tests of region restart notifications today, I know it was annoying, thanks especially to the EMs for allowing me a testbed.
This commit is contained in:
@@ -723,6 +723,16 @@
|
||||
<key>Value</key>
|
||||
<string></string>
|
||||
</map>
|
||||
|
||||
<key>EmergencyTeleportLandmark</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>UUID of the landmark to teleport to in the last twenty seconds before a region will restart, empty is none.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
@@ -258,6 +258,7 @@ void LLPrefsAscentSys::refreshValues()
|
||||
mDisableClickSitOtherOwner = gSavedSettings.getBOOL("DisableClickSitOtherOwner");
|
||||
mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps");
|
||||
mNumScriptDiff = gSavedSettings.getF32("Ascentnumscriptdiff");
|
||||
mLandmark = gSavedPerAccountSettings.getString("EmergencyTeleportLandmark");
|
||||
|
||||
//Build -------------------------------------------------------------------------------
|
||||
mAlpha = gSavedSettings.getF32("EmeraldBuildPrefs_Alpha");
|
||||
@@ -414,6 +415,7 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setBOOL("DisableClickSitOtherOwner", mDisableClickSitOtherOwner);
|
||||
gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps);
|
||||
gSavedSettings.setF32("Ascentnumscriptdiff", mNumScriptDiff);
|
||||
gSavedPerAccountSettings.setString("EmergencyTeleportLandmark", mLandmark);
|
||||
|
||||
//Build -------------------------------------------------------------------------------
|
||||
gSavedSettings.setF32("EmeraldBuildPrefs_Alpha", mAlpha);
|
||||
|
||||
@@ -109,6 +109,7 @@ private:
|
||||
bool mDisableClickSitOtherOwner;
|
||||
bool mDisplayScriptJumps;
|
||||
F32 mNumScriptDiff;
|
||||
std::string mLandmark;
|
||||
|
||||
//Build -------------------------------------------------------------------------------
|
||||
F32 mAlpha;
|
||||
|
||||
@@ -35,6 +35,18 @@
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
// <singu> For emergency teleports
|
||||
#include "llinventorymodel.h"
|
||||
void emergency_teleport()
|
||||
{
|
||||
static const LLCachedControl<std::string> landmark(gSavedPerAccountSettings, "EmergencyTeleportLandmark");
|
||||
if (landmark().empty()) return;
|
||||
const LLUUID id(landmark);
|
||||
if (id.isNull()) return;
|
||||
if (LLViewerInventoryItem* item = gInventory.getItem(id))
|
||||
gAgent.teleportViaLandmark(item->getAssetUUID());
|
||||
}
|
||||
// </singu>
|
||||
|
||||
enum shake_state
|
||||
{
|
||||
@@ -66,6 +78,7 @@ LLFloaterRegionRestarting::LLFloaterRegionRestarting(const LLSD& key) :
|
||||
refresh();
|
||||
|
||||
mRegionChangedConnection = LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterRegionRestarting::close, this, false));
|
||||
if (mSeconds <= 20) emergency_teleport(); // <singu/> For emergency teleports
|
||||
}
|
||||
|
||||
LLFloaterRegionRestarting::~LLFloaterRegionRestarting()
|
||||
@@ -93,6 +106,7 @@ void LLFloaterRegionRestarting::refresh()
|
||||
args["[SECONDS]"] = llformat("%d", mSeconds);
|
||||
mRestartSeconds->setValue(getString("RestartSeconds", args));
|
||||
|
||||
if (mSeconds == 20) emergency_teleport(); // <singu/> For emergency teleports
|
||||
if (!mSeconds) return; // Zero means we're done.
|
||||
--mSeconds;
|
||||
}
|
||||
@@ -177,5 +191,6 @@ void LLFloaterRegionRestarting::onClose(bool app_quitting)
|
||||
void LLFloaterRegionRestarting::updateTime(const U32& time)
|
||||
{
|
||||
mSeconds = time;
|
||||
if (mSeconds <= 20) emergency_teleport(); // <singu/> For emergency teleports
|
||||
sShakeState = SHAKE_START;
|
||||
}
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
<check_box bottom_delta="-20" left="10" follows="top" initial_value="false" label="Display Total Script Count changes:" name="totalscriptjumps" control_name="AscentDisplayTotalScriptJumps" tool_tip="Displays script count changes in your region, dependant on the threshold you choose to the right."/>
|
||||
<spinner bottom_delta="0" decimal_digits="0" follows="top" height="16" increment="1" left_delta="210" max_val="9999" min_val="1" name="ScriptJumpCount" width="50" control_name="Ascentnumscriptdiff" tool_tip="Threshold for the script jump message [Default: 100]"/>
|
||||
<check_box bottom_delta="-20" left="10" follows="top" label="Restrained Love API Support (RLVa)" name="RestrainedLove" control_name="RestrainedLove" tool_tip="Allows scripts to take greater control of the viewer, if you wear compliant objects."/>
|
||||
<text name="EmergencyTeleportDesc" left="14" bottom_delta="-12" follows="top">Drop a landmark below to autoteleport there in the last 20 seconds before region restarts</text>
|
||||
<drop_target control_name="EmergencyTeleportLandmark" bottom_delta="-8" left="15" height="17" name="emergency_teleport_landmark_drop" width="430"/>
|
||||
</panel>
|
||||
|
||||
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Building" name="Building">
|
||||
|
||||
Reference in New Issue
Block a user