summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-11-01 16:59:30 +0000
committerRider Linden <rider@lindenlab.com>2018-11-01 16:59:30 +0000
commit2c5d17aa6badb25718c8a328c83be3a8f3debd8e (patch)
treefbe2c76b1bc651bf91eab6701667ea7f19958e4a /indra/newview
parent6505a80b4a0dc5b41ae25806efbf1e83e432a519 (diff)
parent64db1f48206ead083661a3f9df93bff9b37074a8 (diff)
Merged in andreykproductengine/maint-eep2 (pull request #176)
SL-9793 EEP Clouds vanish and reappear abruptly if one of textures is not set Approved-by: Graham Madarasz <graham@lindenlab.com>
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp21
-rw-r--r--indra/newview/llvosky.cpp6
2 files changed, 14 insertions, 13 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 3d3ab9e80b..aff9dec0db 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -51,6 +51,7 @@
// newview
#include "llagent.h"
+#include "llappviewer.h" //gDisconected
#include "llparcel.h"
#include "llflyoutcombobtn.h" //Todo: make a proper UI element/button/panel instead
#include "llregioninfomodel.h"
@@ -1523,17 +1524,19 @@ void LLFloaterEditExtDayCycle::stopPlay()
//static
void LLFloaterEditExtDayCycle::onIdlePlay(void* user_data)
{
- LLFloaterEditExtDayCycle* self = (LLFloaterEditExtDayCycle*)user_data;
-
- F32 prcnt_played = self->mPlayTimer.getElapsedTimeF32() / DAY_CYCLE_PLAY_TIME_SECONDS;
- F32 new_frame = fmod(self->mPlayStartFrame + prcnt_played, 1.f);
+ if (!gDisconnected)
+ {
+ LLFloaterEditExtDayCycle* self = (LLFloaterEditExtDayCycle*)user_data;
- self->mTimeSlider->setCurSliderValue(new_frame); // will do the rounding
- self->mSkyBlender->setPosition(new_frame);
- self->mWaterBlender->setPosition(new_frame);
- self->synchronizeTabs();
- self->updateTimeAndLabel();
+ F32 prcnt_played = self->mPlayTimer.getElapsedTimeF32() / DAY_CYCLE_PLAY_TIME_SECONDS;
+ F32 new_frame = fmod(self->mPlayStartFrame + prcnt_played, 1.f);
+ self->mTimeSlider->setCurSliderValue(new_frame); // will do the rounding
+ self->mSkyBlender->setPosition(new_frame);
+ self->mWaterBlender->setPosition(new_frame);
+ self->synchronizeTabs();
+ self->updateTimeAndLabel();
+ }
}
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index fe45bdc671..b890e21e41 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -1001,7 +1001,7 @@ void LLVOSky::setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_tex
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
LLUUID moon_tex = moon_texture.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture;
- LLUUID moon_tex_next = moon_texture_next.isNull() ? (moon_texture.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture) : moon_texture_next;
+ LLUUID moon_tex_next = moon_texture_next.isNull() ? psky->GetDefaultMoonTextureId() : moon_texture_next;
mMoonTexturep[0] = moon_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
mMoonTexturep[1] = moon_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
@@ -1026,10 +1026,8 @@ void LLVOSky::setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLU
{
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
- LLUUID cloud_noise_tex_next = cloud_noise_texture_next.isNull() ? (cloud_noise_texture.isNull() ? LLUUID() : cloud_noise_texture) : cloud_noise_texture_next;
-
mCloudNoiseTexturep[0] = cloud_noise_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
- mCloudNoiseTexturep[1] = cloud_noise_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
+ mCloudNoiseTexturep[1] = cloud_noise_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI);
if (mCloudNoiseTexturep[0])
{