FIRE-7425: Built-in movelock improvement - added option to lock and unlock position after stopping or starting movement (Preferences => Move & View => Move)
--HG-- branch : Firestorm_4.6.5
parent
42de71e550
commit
64f9fec8f6
|
|
@ -656,7 +656,18 @@
|
|||
<key>UseMoveLock</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use the client LSL bridge for movelock</string>
|
||||
<string>Use the client LSL Bridge for movelock</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RelockMoveLockAfterMovement</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If movelock built-in into LSL Bridge is active, then lock and unlock position after stopping or starting movement</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//http bridge script v.2.8
|
||||
//http bridge script v.2.9
|
||||
//Firestorm
|
||||
//Tozh Taurog, Arrehn Oberlander, Tonya Souther
|
||||
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
integer UNKNOWN_VIEWER = 1;
|
||||
integer META_CONTROL = 1024; // Control value to do nothing; for no-script sims
|
||||
string bridgeAuth = "BRIDGEKEY"; // Filled in dynamically
|
||||
string bridgeVersion = "2.8"; // This should match fslslbridge.cpp
|
||||
string bridgeVersion = "2.9"; // This should match fslslbridge.cpp
|
||||
string bridgeURL;
|
||||
string latestURL;
|
||||
integer debug = FALSE;
|
||||
|
|
@ -55,6 +55,8 @@
|
|||
|
||||
// Movelock
|
||||
integer useMoveLock = FALSE;
|
||||
integer relockMoveLockAfterMovement = FALSE;
|
||||
integer relockIsUserMoving = FALSE;
|
||||
|
||||
// Flight assist
|
||||
float MIN_SPEED = 2.0;
|
||||
|
|
@ -132,7 +134,7 @@
|
|||
|
||||
if (llGetAttached() != 0)
|
||||
{
|
||||
llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);
|
||||
llRequestPermissions(owner, PERMISSION_TAKE_CONTROLS);
|
||||
}
|
||||
|
||||
// Assume the worst and let the viewer convince us otherwise
|
||||
|
|
@ -148,6 +150,13 @@
|
|||
// Check the state of movelock, relock if needed
|
||||
if (useMoveLock)
|
||||
{
|
||||
if (relockMoveLockAfterMovement)
|
||||
{
|
||||
if (llGetAttached())
|
||||
{
|
||||
request_control_perms();
|
||||
}
|
||||
}
|
||||
//debugOutput("Movelock true, going to movelock_init");
|
||||
movelock_init();
|
||||
}
|
||||
|
|
@ -316,6 +325,18 @@
|
|||
llStopMoveToTarget();
|
||||
}
|
||||
}
|
||||
else if (cmd == "RelockMoveLockAfterMovement")
|
||||
{
|
||||
//debugOutput("Parsing params: " + llList2String(commandList, 1));
|
||||
relockMoveLockAfterMovement = llList2Integer(commandList, 1);
|
||||
if (relockMoveLockAfterMovement)
|
||||
{
|
||||
if (llGetAttached())
|
||||
{
|
||||
request_control_perms();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -633,14 +654,9 @@ reportTag(key av, integer tagIdx)
|
|||
last_time = time;
|
||||
}
|
||||
|
||||
flight_take_controls()
|
||||
request_control_perms()
|
||||
{
|
||||
llTakeControls(CONTROL_UP|CONTROL_DOWN, TRUE, TRUE);
|
||||
}
|
||||
|
||||
flight_request_perms()
|
||||
{
|
||||
flight_take_controls();
|
||||
llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_UP | CONTROL_DOWN, TRUE, TRUE);
|
||||
}
|
||||
|
||||
flight_init()
|
||||
|
|
@ -655,7 +671,7 @@ reportTag(key av, integer tagIdx)
|
|||
falling = -1;
|
||||
hovering = -1;
|
||||
if (llGetAttached())
|
||||
flight_request_perms();
|
||||
request_control_perms();
|
||||
flight_set_tick(SLOW_TICK);
|
||||
}
|
||||
|
||||
|
|
@ -720,8 +736,10 @@ default
|
|||
{
|
||||
if (i)
|
||||
{
|
||||
if (useFlightAssist)
|
||||
flight_take_controls();
|
||||
if (useFlightAssist || useMoveLock)
|
||||
{
|
||||
request_control_perms();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Take control for value that does nothing, in order to work in no-script sims
|
||||
|
|
@ -732,6 +750,24 @@ default
|
|||
|
||||
control(key id, integer level, integer edge)
|
||||
{
|
||||
|
||||
if (useMoveLock && relockMoveLockAfterMovement)
|
||||
{
|
||||
if (level & (CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_UP | CONTROL_DOWN))
|
||||
{
|
||||
if (relockIsUserMoving == FALSE)
|
||||
{
|
||||
relockIsUserMoving = TRUE;
|
||||
llStopMoveToTarget();
|
||||
}
|
||||
}
|
||||
else if (relockIsUserMoving == TRUE)
|
||||
{
|
||||
relockIsUserMoving = FALSE;
|
||||
movelock_init();
|
||||
}
|
||||
}
|
||||
|
||||
if ((llGetAgentInfo(owner) & AGENT_FLYING) && useFlightAssist)
|
||||
{
|
||||
controls = 0;
|
||||
|
|
@ -740,6 +776,7 @@ default
|
|||
if (controls > 0)
|
||||
flight_check_boost();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
changed(integer change)
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@
|
|||
const std::string FS_BRIDGE_FOLDER = "#LSL Bridge";
|
||||
const std::string FS_BRIDGE_CONTAINER_FOLDER = "Landscaping";
|
||||
const U32 FS_BRIDGE_MAJOR_VERSION = 2;
|
||||
const U32 FS_BRIDGE_MINOR_VERSION = 8;
|
||||
const U32 FS_BRIDGE_MINOR_VERSION = 9;
|
||||
const U32 FS_MAX_MINOR_VERSION = 99;
|
||||
|
||||
//current script version is 2.8
|
||||
//current script version is 2.9
|
||||
const std::string UPLOAD_SCRIPT_CURRENT = "EBEDD1D2-A320-43f5-88CF-DD47BBCA5DFB.lsltxt";
|
||||
|
||||
//
|
||||
|
|
@ -221,6 +221,7 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID,
|
|||
//then check options use
|
||||
updateBoolSettingValue("UseLSLFlightAssist");
|
||||
updateBoolSettingValue("UseMoveLock");
|
||||
updateBoolSettingValue("RelockMoveLockAfterMovement");
|
||||
updateBoolSettingValue("FSPublishRadarTag");
|
||||
mIsFirstCallDone = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ bool callback_clear_cache(const LLSD& notification, const LLSD& response);
|
|||
bool callback_clear_inventory_cache(const LLSD& notification, const LLSD& response);
|
||||
void handleFlightAssistOptionChanged(const LLSD& newvalue);
|
||||
void handleMovelockOptionChanged(const LLSD& newvalue);
|
||||
void handleMovelockAfterMoveOptionChanged(const LLSD& newvalue);
|
||||
bool callback_clear_settings(const LLSD& notification, const LLSD& response);
|
||||
// <FS:AW opensim search support>
|
||||
bool callback_clear_debug_search(const LLSD& notification, const LLSD& response);
|
||||
|
|
|
|||
|
|
@ -759,6 +759,11 @@ static void handleMovelockOptionChanged(const LLSD& newvalue)
|
|||
{
|
||||
FSLSLBridge::instance().updateBoolSettingValue("UseMoveLock", newvalue.asBoolean());
|
||||
}
|
||||
static void handleMovelockAfterMoveOptionChanged(const LLSD& newvalue)
|
||||
{
|
||||
FSLSLBridge::instance().updateBoolSettingValue("RelockMoveLockAfterMovement", newvalue.asBoolean());
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
static void handleDecimalPrecisionChanged(const LLSD& newvalue)
|
||||
{
|
||||
|
|
@ -768,7 +773,6 @@ static void handleDecimalPrecisionChanged(const LLSD& newvalue)
|
|||
build_tools->changePrecision(newvalue);
|
||||
}
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
@ -960,6 +964,7 @@ void settings_setup_listeners()
|
|||
gSavedPerAccountSettings.getControl("UseLSLFlightAssist")->getCommitSignal()->connect(boost::bind(&handleFlightAssistOptionChanged, _2));
|
||||
gSavedPerAccountSettings.getControl("FSPublishRadarTag")->getCommitSignal()->connect(boost::bind(&handlePublishRadarTagOptionChanged, _2));
|
||||
gSavedPerAccountSettings.getControl("UseMoveLock")->getCommitSignal()->connect(boost::bind(&handleMovelockOptionChanged, _2));
|
||||
gSavedPerAccountSettings.getControl("RelockMoveLockAfterMovement")->getCommitSignal()->connect(boost::bind(&handleMovelockAfterMoveOptionChanged, _2));
|
||||
gSavedSettings.getControl("FSBuildToolDecimalPrecision")->getCommitSignal()->connect(boost::bind(&handleDecimalPrecisionChanged, _2));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -423,17 +423,42 @@
|
|||
name="automatic_fly"
|
||||
width="237"
|
||||
top_pad="0"/>
|
||||
|
||||
<text
|
||||
follows="left|top"
|
||||
type="string"
|
||||
length="1"
|
||||
height="10"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="movelock_lbl"
|
||||
width="450"
|
||||
top_pad="5">
|
||||
If movelock built-in into LSL Bridge is active...
|
||||
</text>
|
||||
<check_box
|
||||
control_name="RelockMoveLockAfterRegionChange"
|
||||
enabled_control="UseLSLBridge"
|
||||
follows="left|top"
|
||||
height="20"
|
||||
label="If movelock is enabled, then always re-lock position after region change"
|
||||
label="Always re-lock position after region change"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
left_delta="5"
|
||||
name="RelockMoveLockAfterRegionChange"
|
||||
width="237"
|
||||
top_pad="5"/>
|
||||
<check_box
|
||||
control_name="RelockMoveLockAfterMovement"
|
||||
enabled_control="UseLSLBridge"
|
||||
follows="left|top"
|
||||
height="20"
|
||||
label="Lock and unlock position after stopping or starting movement"
|
||||
layout="topleft"
|
||||
left_delta="0"
|
||||
name="RelockMoveLockAfterMovement"
|
||||
width="237"
|
||||
top_pad="0"/>
|
||||
|
||||
<text
|
||||
follows="left|top"
|
||||
type="string"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,11 @@
|
|||
<check_box label="Odtwórz dźwięk podczas teleportacji" name="PlayTeleportSound"/>
|
||||
<check_box label="Zawsze lataj po teleportacji" name="FSFlyAfterTeleport"/>
|
||||
<check_box label="Przytrzymaj klawisz skoku lub kucania, aby zacząć lub przestać latać" name="automatic_fly"/>
|
||||
<check_box label="Zawsze blokuj ponownie pozycję po zmianie regionu, jeśli unieruchamianie jest włączone" name="RelockMoveLockAfterRegionChange"/>
|
||||
<text name="movelock_lbl">
|
||||
Jeśli unieruchamianie wbudowane w Most LSL jest aktywne...
|
||||
</text>
|
||||
<check_box label="Zawsze blokuj ponownie pozycję po zmianie regionu" name="RelockMoveLockAfterRegionChange"/>
|
||||
<check_box label="Blokuj i odblokowywuj pozycję po zakończeniu lub rozpoczęciu ruchu" name="RelockMoveLockAfterMovement"/>
|
||||
<text name="single_click_action_lbl">
|
||||
Pojedynczy klik na ziemi:
|
||||
</text>
|
||||
|
|
|
|||
Loading…
Reference in New Issue