summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-06-25 14:44:09 -0700
committerRider Linden <rider@lindenlab.com>2018-06-25 14:44:09 -0700
commitd25f80181463d373c317835a219903bcdf9b91c8 (patch)
tree78f9c09c7519ba0af5bd51fcbfb3b409a74e127e /indra/newview
parent4356b8dc0ea7754ce643596d99f3f051a8f8917a (diff)
Fix cloud scroll adjustment in the editor, pause clouds method, set sun disk UUID to null.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llenvironment.cpp4
-rw-r--r--indra/newview/llenvironment.h4
-rw-r--r--indra/newview/llpaneleditsky.cpp5
3 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index e3a030225d..94605dc062 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -258,6 +258,8 @@ const F32 LLEnvironment::SUN_DELTA_YAW(F_PI); // 180deg
//-------------------------------------------------------------------------
LLEnvironment::LLEnvironment():
+ mCloudScrollDelta(),
+ mCloudScrollPaused(false),
mSelectedSky(),
mSelectedWater(),
mSelectedDay(),
@@ -851,7 +853,7 @@ void LLEnvironment::updateCloudScroll()
F64 delta_t = s_cloud_timer.getElapsedTimeAndResetF64();
- if (mCurrentEnvironment->getSky())
+ if (mCurrentEnvironment->getSky() && !mCloudScrollPaused)
{
LLVector2 cloud_delta = static_cast<F32>(delta_t)* (mCurrentEnvironment->getSky()->getCloudScrollRate() - LLVector2(10.0, 10.0)) / 100.0;
mCloudScrollDelta += cloud_delta;
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 0fdedb91f7..d2664717dd 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -185,6 +185,9 @@ public:
void updateEnvironment(LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false);
inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; }
+ void pauseCloudScroll() { mCloudScrollPaused = true; }
+ void resumeCloudScroll() { mCloudScrollPaused = false; }
+ bool isCloudScrollPaused() const { return mCloudScrollPaused; }
F32 getCamHeight() const;
F32 getWaterHeight() const;
@@ -331,6 +334,7 @@ private:
F32 mLastCamYaw = 0.0f;
LLVector2 mCloudScrollDelta; // cumulative cloud delta
+ bool mCloudScrollPaused;
InstanceArray_t mEnvironments;
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index b6cd4bb37f..3f1ca69178 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -71,6 +71,8 @@ namespace
const F32 SLIDER_SCALE_BLUE_HORIZON_DENSITY(2.0f);
const F32 SLIDER_SCALE_GLOW_R(20.0f);
const F32 SLIDER_SCALE_GLOW_B(-5.0f);
+
+ const LLVector2 CLOUD_SCROLL_ADJUST(10, 10);
}
static LLPanelInjector<LLPanelSettingsSkyAtmosTab> t_settings_atmos("panel_settings_atmos");
@@ -226,6 +228,7 @@ void LLPanelSettingsSkyCloudTab::refresh()
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setValue(mSkySettings->getCloudScale());
LLVector2 cloudScroll(mSkySettings->getCloudScrollRate());
+ cloudScroll -= CLOUD_SCROLL_ADJUST;
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->setValue(cloudScroll.getValue());
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setValue(mSkySettings->getCloudNoiseTextureId());
@@ -260,7 +263,7 @@ void LLPanelSettingsSkyCloudTab::onCloudScaleChanged()
void LLPanelSettingsSkyCloudTab::onCloudScrollChanged()
{
LLVector2 scroll(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->getValue());
-
+ scroll += CLOUD_SCROLL_ADJUST;
mSkySettings->setCloudScrollRate(scroll);
}