FIRE-21622: Tweak Flight Assist by adjusting speeds, addin proper mass measurement and minimum flight altitude
parent
d77c584a9c
commit
ef8b7fd627
|
|
@ -900,7 +900,7 @@
|
|||
<key>UseLSLFlightAssist</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use the client LSL bridge for flight boost - boost power: 0.0 (disabled), 1.0 (low), 3.0 (standard), 5.0 (high).</string>
|
||||
<string>Use the client LSL bridge for flight boost - boost power: 0.0 (disabled), 5.0 (low), 10.0 (moderate), 15.0 (high).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
|
||||
// Bridge platform
|
||||
string BRIDGE_VERSION = "2.21"; // This should match fslslbridge.cpp
|
||||
string BRIDGE_VERSION = "2.22"; // This should match fslslbridge.cpp
|
||||
string gLatestURL;
|
||||
integer gViewerIsFirestorm;
|
||||
integer gTryHandshakeOnce = TRUE;
|
||||
|
|
@ -26,10 +26,11 @@
|
|||
integer gRelockIsUserMoving;
|
||||
|
||||
// Flight assist
|
||||
float FLIGHT_CHECK_NORMAL = 1.0;
|
||||
float FLIGHT_CHECK_SLOW = 5.0;
|
||||
integer gIsFlyingNow;
|
||||
float FLIGHT_CHECK_NORMAL = 0.2;
|
||||
float FLIGHT_CHECK_SLOW = 3.0;
|
||||
float gFlightAssistPushForce;
|
||||
float gFlightAssistMinAltitude = 10;
|
||||
|
||||
// OpenCollar/LockMeister AO interface
|
||||
integer gAO_EnabledOC;
|
||||
|
|
@ -254,7 +255,16 @@ default
|
|||
|
||||
if (gFlightAssistPushForce > 0 && gIsFlyingNow)
|
||||
{
|
||||
if (level & (CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_UP | CONTROL_DOWN))
|
||||
|
||||
vector currentPosition = llGetPos();
|
||||
float currentGroundLevel = llGround(ZERO_VECTOR);
|
||||
float currentWaterLevel = llWater(ZERO_VECTOR);
|
||||
if (currentGroundLevel < currentWaterLevel)
|
||||
{
|
||||
currentGroundLevel = currentWaterLevel;
|
||||
}
|
||||
|
||||
if (currentPosition.z > currentGroundLevel + gFlightAssistMinAltitude && level & (CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_UP | CONTROL_DOWN))
|
||||
{
|
||||
vector pushingForce = ZERO_VECTOR;
|
||||
// Forward / back
|
||||
|
|
@ -284,8 +294,9 @@ default
|
|||
{
|
||||
pushingForce += <0, 0, -gFlightAssistPushForce>;
|
||||
}
|
||||
llApplyImpulse(pushingForce, 1);
|
||||
llApplyImpulse(llGetMassMKS() * pushingForce, 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -506,10 +517,10 @@ default
|
|||
gFlightAssistPushForce = speed;
|
||||
if (gFlightAssistPushForce > 0)
|
||||
{
|
||||
if (gFlightAssistPushForce > 5.0)
|
||||
if (gFlightAssistPushForce > 15.0)
|
||||
{
|
||||
// No lightspeed please!
|
||||
gFlightAssistPushForce = 5.0;
|
||||
gFlightAssistPushForce = 15.0;
|
||||
}
|
||||
llSetTimerEvent(FLIGHT_CHECK_NORMAL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
static const std::string FS_BRIDGE_FOLDER = "#LSL Bridge";
|
||||
static const std::string FS_BRIDGE_CONTAINER_FOLDER = "Landscaping";
|
||||
static const U32 FS_BRIDGE_MAJOR_VERSION = 2;
|
||||
static const U32 FS_BRIDGE_MINOR_VERSION = 21;
|
||||
static const U32 FS_BRIDGE_MINOR_VERSION = 22;
|
||||
static const U32 FS_MAX_MINOR_VERSION = 99;
|
||||
static const std::string UPLOAD_SCRIPT_CURRENT = "EBEDD1D2-A320-43f5-88CF-DD47BBCA5DFB.lsltxt";
|
||||
static const std::string FS_STATE_ATTRIBUTE = "state=";
|
||||
|
|
@ -221,6 +221,7 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID,
|
|||
if (gSavedPerAccountSettings.getF32("UseLSLFlightAssist") > 0.f)
|
||||
{
|
||||
viewerToLSL(llformat("UseLSLFlightAssist|%.1f", gSavedPerAccountSettings.getF32("UseLSLFlightAssist")) );
|
||||
report_to_nearby_chat(LLTrans::getString("FlightAssistEnabled"));
|
||||
}
|
||||
|
||||
// <FS:PP> Inform user, if movelock was enabled at login
|
||||
|
|
|
|||
|
|
@ -168,15 +168,15 @@
|
|||
<combo_box.item
|
||||
label="Flight Assist: Mild boost"
|
||||
name="flight_mild"
|
||||
value="1.0" />
|
||||
value="5.0" />
|
||||
<combo_box.item
|
||||
label="Flight Assist: Moderate boost"
|
||||
name="flight_moderate"
|
||||
value="3.0" />
|
||||
value="10.0" />
|
||||
<combo_box.item
|
||||
label="Flight Assist: Strong boost"
|
||||
name="flight_strong"
|
||||
value="5.0" />
|
||||
value="15.0" />
|
||||
</combo_box>
|
||||
|
||||
</panel>
|
||||
|
|
|
|||
|
|
@ -2777,6 +2777,7 @@ Try enclosing path to the editor with double quotes.
|
|||
<string name="MovelockDisabled">Movelock disabled</string>
|
||||
<string name="MovelockEnabling">Enabling movelock...</string>
|
||||
<string name="MovelockDisabling">Disabling movelock...</string>
|
||||
<string name="FlightAssistEnabled">Flight Assist is enabled</string>
|
||||
|
||||
<string name="BusyResponse">busy response</string>
|
||||
|
||||
|
|
|
|||
|
|
@ -5590,6 +5590,9 @@ Spróbuj załączyć ścieżkę do edytora w cytowaniu.
|
|||
<string name="MovelockDisabling">
|
||||
Wyłączanie blokady pozycji...
|
||||
</string>
|
||||
<string name="FlightAssistEnabled">
|
||||
Pomocnik lotu jest włączony
|
||||
</string>
|
||||
<string name="BusyResponse">
|
||||
Wiadomość zajętości
|
||||
</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue