Stylistic changes and such.
This commit is contained in:
@@ -812,6 +812,8 @@ void LLAgent::toggleFlying()
|
||||
bool LLAgent::enableFlying()
|
||||
{
|
||||
BOOL sitting = FALSE;
|
||||
static LLCachedControl<bool> continue_flying_on_unsit(gSavedSettings, "LiruContinueFlyingOnUnsit", false);
|
||||
if (!continue_flying_on_unsit)
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
sitting = gAgentAvatarp->isSitting();
|
||||
|
||||
@@ -243,12 +243,11 @@ void audio_update_wind(bool fade)
|
||||
volume_delta = (LLFrameTimer::getFrameDeltaTimeF32() / WIND_SOUND_TRANSITION_TIME) * max_wind_volume;
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> MuteWind("MuteWind");
|
||||
static LLCachedControl<bool> ContinueFlying("LiruContinueFlyingOnUnsit");
|
||||
static LLCachedControl<bool> MuteWind(gSavedSettings, "MuteWind", false);
|
||||
static LLCachedControl<bool> ContinueFlying(gSavedSettings, "LiruContinueFlyingOnUnsit", false);
|
||||
// mute wind entirely when the user asked or when the user is seated, but flying
|
||||
if (MuteWind || (ContinueFlying && gAgentAvatarp&& gAgentAvatarp->isSitting()))
|
||||
if (MuteWind || (ContinueFlying && gAgentAvatarp && gAgentAvatarp->isSitting()))
|
||||
{
|
||||
// volume decreases by itself
|
||||
gAudiop->mMaxWindGain = 0.f;
|
||||
}
|
||||
// mute wind when not /*flying*/ in air
|
||||
|
||||
@@ -3981,17 +3981,7 @@ class LLWorldEnableFly : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
BOOL sitting = FALSE;
|
||||
static LLCachedControl<bool> continue_flying_on_unsit("LiruContinueFlyingOnUnsit");
|
||||
if (continue_flying_on_unsit)
|
||||
{
|
||||
sitting = false;
|
||||
}
|
||||
else if (gAgentAvatarp)
|
||||
{
|
||||
sitting = gAgentAvatarp->isSitting();
|
||||
}
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(!sitting);
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(gAgent.enableFlying());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user