Add feature to Continue flying upon standing, if the user was flying when they sat down.

A couple users said this could be handy.
Useful for birds, fairies, and otherwise flying critters.
This commit is contained in:
Inusaito Sayori
2012-12-24 05:24:57 -05:00
parent 60621a300c
commit 977f17a893
6 changed files with 42 additions and 21 deletions

View File

@@ -704,6 +704,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>LiruContinueFlyingOnUnsit</key>
<map>
<key>Comment</key>
<string>Fly after standing up, if you were flying when you sat down</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>LiruFlyAfterTeleport</key>
<map>
<key>Comment</key>

View File

@@ -268,6 +268,7 @@ void LLPrefsAscentSys::refreshValues()
mResetCameraAfterTP = gSavedSettings.getBOOL("OptionRotateCamAfterLocalTP");
mOffsetTPByUserHeight = gSavedSettings.getBOOL("OptionOffsetTPByAgentHeight");
mLiruFlyAfterTeleport = gSavedSettings.getBOOL("LiruFlyAfterTeleport");
mLiruContinueFlying = gSavedSettings.getBOOL("LiruContinueFlyingOnUnsit");
mPreviewAnimInWorld = gSavedSettings.getBOOL("PreviewAnimInWorld");
mSaveScriptsAsMono = gSavedSettings.getBOOL("SaveInventoryScriptsAsMono");
mAlwaysRezInGroup = gSavedSettings.getBOOL("AscentAlwaysRezInGroup");
@@ -418,6 +419,7 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setBOOL("OptionRotateCamAfterLocalTP", mResetCameraAfterTP);
gSavedSettings.setBOOL("OptionOffsetTPByAgentHeight", mOffsetTPByUserHeight);
gSavedSettings.setBOOL("LiruFlyAfterTeleport", mLiruFlyAfterTeleport);
gSavedSettings.setBOOL("LiruContinueFlyingOnUnsit", mLiruContinueFlying);
gSavedSettings.setBOOL("PreviewAnimInWorld", mPreviewAnimInWorld);
gSavedSettings.setBOOL("SaveInventoryScriptsAsMono", mSaveScriptsAsMono);
gSavedSettings.setBOOL("AscentAlwaysRezInGroup", mAlwaysRezInGroup);

View File

@@ -59,6 +59,7 @@ protected:
BOOL mResetCameraAfterTP;
BOOL mOffsetTPByUserHeight;
bool mLiruFlyAfterTeleport;
bool mLiruContinueFlying;
BOOL mPreviewAnimInWorld;
BOOL mSaveScriptsAsMono;
BOOL mAlwaysRezInGroup;

View File

@@ -253,8 +253,11 @@ void audio_update_wind(bool force_update)
// which is sufficient to completely turn off or turn on wind noise
volume_delta = 1.f;
}
// mute wind entirely when the user asked
if (gSavedSettings.getBOOL("MuteWind"))
static LLCachedControl<bool> MuteWind("MuteWind");
static LLCachedControl<bool> ContinueFlying("LiruContinueFlyingOnUnsit");
// mute wind entirely when the user asked or when the user is seated, but flying
if (MuteWind || (ContinueFlying && gAgentAvatarp&& gAgentAvatarp->isSitting()))
{
// volume decreases by itself
gAudiop->mMaxWindGain = 0.f;

View File

@@ -5385,7 +5385,10 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
gAgentCamera.setForceMouselook(force_mouselook);
// Forcing turning off flying here to prevent flying after pressing "Stand"
// to stand up from an object. See EXT-1655.
gAgent.setFlying(FALSE);
// Unless the user wants to.
static LLCachedControl<bool> ContinueFlying("LiruContinueFlyingOnUnsit");
if (!ContinueFlying)
gAgent.setFlying(FALSE);
LLViewerObject* object = gObjectList.findObject(sitObjectID);
if (object)

View File

@@ -5,37 +5,38 @@
<panel border="true" left="1" bottom="-408" height="408" width="500" label="General" name="User Interface">
<check_box left="10" bottom_delta="-25" control_name="DoubleClickTeleport" follows="top" initial_value="false"
label="Enable teleporting via double-click in-world" tool_tip="Double-clicking on an object/person will teleport you to that location." name="double_click_teleport_check"/>
<check_box left="20" bottom_delta="-20" control_name="OptionRotateCamAfterLocalTP" follows="top" initial_value="false"
<check_box left="20" bottom_delta="-18" control_name="OptionRotateCamAfterLocalTP" follows="top" initial_value="false"
label="Reset camera after teleporting" tool_tip="Centers the camera behind you after a local teleport." name="center_after_teleport_check"/>
<check_box bottom_delta="-20" control_name="OptionOffsetTPByAgentHeight" follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
<check_box bottom_delta="-18" control_name="OptionOffsetTPByAgentHeight" follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
label="Offset TP target by half agent height" tool_tip="Tries to aim the TP so that your feet land at the point you're aiming for." name="offset_teleport_check"/>
<check_box left="10" follows="top" bottom_delta="-20" control_name="LiruFlyAfterTeleport" name="fly_after_tp" label="Always fly after teleports" tool_tip="Avoid those falls from great heights by automatically flying after teleporting in."/>
<check_box left="10" bottom_delta="-20" control_name="PreviewAnimInWorld" follows="top" initial_value="false"
<check_box left="10" follows="top" bottom_delta="-18" control_name="LiruFlyAfterTeleport" name="fly_after_tp" label="Always fly after teleports" tool_tip="Avoid those falls from great heights by automatically flying after teleporting in."/>
<check_box left="10" follows="top" bottom_delta="-18" control_name="LiruContinueFlyingOnUnsit" name="continue_flying" label="Continue flying upon standing" tool_tip="Keeps your Fly state the same as when you sat down, so you continue to fly or not when you stand up. Useful for birds, fairies, or those who just wish to make a dramatic leap from their chairs."/>
<check_box left="10" bottom_delta="-18" control_name="PreviewAnimInWorld" follows="top" initial_value="false"
label="Preview animations on the avatar instead on a dummy before uploading" tool_tip="The Animation upload window will play animations on your avatar when previewing them." name="preview_anim_in_world_check"/>
<check_box bottom_delta="-20" control_name="SaveInventoryScriptsAsMono" follows="left|top" initial_value="true"
<check_box bottom_delta="-18" control_name="SaveInventoryScriptsAsMono" follows="left|top" initial_value="true"
label="Save scripts in inventory as Mono scripts instead of LSL2" tool_tip="Scripts will automatically be compiled in Mono when saving - Usually only possible when placed in an object." name="save_scripts_as_mono_check"/>
<check_box bottom_delta="-20" control_name="AscentAlwaysRezInGroup" follows="left|top" initial_value="true"
<check_box bottom_delta="-18" control_name="AscentAlwaysRezInGroup" follows="left|top" initial_value="true"
label="Always rez objects as land group when available" tool_tip="Rez objects with the same group that the object is being rezzed on has, regardless of your active tag." name="always_rez_in_group_check"/>
<check_box bottom_delta="-20" control_name="AscentBuildAlwaysEnabled" follows="left|top" initial_value="true"
<check_box bottom_delta="-18" control_name="AscentBuildAlwaysEnabled" follows="left|top" initial_value="true"
label="Always show Build as enabled" tool_tip="Allows you to use the Build menu without having to be tricky about it. May not mean you can actually build there." name="always_build_check"/>
<check_box bottom_delta="-20" control_name="AscentFlyAlwaysEnabled" follows="left|top" initial_value="true"
<check_box bottom_delta="-18" control_name="AscentFlyAlwaysEnabled" follows="left|top" initial_value="true"
label="Always allow Fly" tool_tip="Lets you fly in locations you shouldn't be allowed to. Use at your own risk - Just because you can doesn't mean you should." name="always_fly_check"/>
<check_box bottom_delta="-20" control_name="AscentDisableMinZoomDist" follows="left|top" initial_value="true"
<check_box bottom_delta="-18" control_name="AscentDisableMinZoomDist" follows="left|top" initial_value="true"
label="Disable camera minimum distance" tool_tip="Allows the camera to get reeeaaally close to things." name="disable_camera_zoom_check"/>
<check_box bottom_delta="-20" follows="left|top" initial_value="true"
<check_box bottom_delta="-18" follows="left|top" initial_value="true"
label="Enable Power User functionality" tool_tip="Adds features deemed too dangerous for normal use. These features can wreak havoc or do bad things if misused - Mostly to yourself or your belongings. If you're sure, activate the checkbox below as well." name="power_user_check"/>
<check_box bottom_delta="-20" enabled="true" follows="top" left="20" initial_value="true"
<check_box bottom_delta="-18" enabled="true" follows="top" left="20" initial_value="true"
label="Confirm Power User functionality" tool_tip="Confirms Power User activation. Turn this on at your own risk, and use any features it enables responsibly. Singularity devs won't replace anything you break. We recommend having a backup copy of anything to be victim to these powers. Unlike most checkboxes, you must click Apply or OK before this will activate." name="power_user_confirm_check"/>
<check_box bottom_delta="-20" control_name="AscentUseSystemFolder" follows="top" left="10" initial_value="true"
<check_box bottom_delta="-18" control_name="AscentUseSystemFolder" follows="top" left="10" initial_value="true"
label="Enable Ascent System Inventory (Requires Restart)" tool_tip="Creates a new folder in the inventory for storing settings files and non-permanent assets." name="system_folder_check"/>
<check_box bottom_delta="-20" control_name="AscentSystemTemporary" follows="top" left="20" initial_value="false"
<check_box bottom_delta="-18" control_name="AscentSystemTemporary" follows="top" left="20" initial_value="false"
label="Temporary uploads go in the System Asset folder." tool_tip="Puts temporary uploads in the Asset folder which separates them from actual uploads, making them easier to find." name="temp_in_system_check"/>
<check_box bottom_delta="-20" control_name="FetchInventoryOnLogin" follows="top" left="10" initial_value="true"
<check_box bottom_delta="-18" control_name="FetchInventoryOnLogin" follows="top" left="10" initial_value="true"
label="Automatically fetch the inventory in the background after login" tool_tip="Inventory will preload when you log in, so you don't have to wait for it to load when doing an initial search." name="fetch_inventory_on_login_check"/>
<check_box bottom_delta="-20" control_name="WindEnabled" follows="left|top" initial_value="false" label="Enable Wind Effects" name="enable_wind"/>
<check_box bottom_delta="-20" control_name="CloudsEnabled" follows="left|top" initial_value="true" label="Enable Clouds" name="enable_clouds"/>
<check_box bottom_delta="-20" left_delta="10" control_name="SkyUseClassicClouds" follows="top" initial_value="true" label="Enable Classic Clouds" name="enable_classic_clouds"/>
<check_box bottom_delta="-20" left_delta="-10" control_name="SpeedRez" follows="top" initial_value="false" label="Enable speed-rezzing via draw distance stepping" name="speed_rez_check" tool_tip="When active, this will progressively increase your draw distance, which allows closer objects/people to rez first."/>
<check_box bottom_delta="-18" control_name="WindEnabled" follows="left|top" initial_value="false" label="Enable Wind Effects" name="enable_wind"/>
<check_box bottom_delta="-18" control_name="CloudsEnabled" follows="left|top" initial_value="true" label="Enable Clouds" name="enable_clouds"/>
<check_box bottom_delta="-18" left_delta="10" control_name="SkyUseClassicClouds" follows="top" initial_value="true" label="Enable Classic Clouds" name="enable_classic_clouds"/>
<check_box bottom_delta="-18" left_delta="-10" control_name="SpeedRez" follows="top" initial_value="false" label="Enable speed-rezzing via draw distance stepping" name="speed_rez_check" tool_tip="When active, this will progressively increase your draw distance, which allows closer objects/people to rez first."/>
<spinner bottom_delta="-20" left="30" control_name="SpeedRezInterval" decimal_digits="0" follows="top" height="16" width="230"
label="Draw distance stepping interval:" label_width="180" max_val="60" min_val="5" initial_val="20" increment="5" name="speed_rez_interval" />
<text bottom_delta="0" left_delta="235" follows="left|top" height="16" name="speed_rez_seconds">seconds</text>