aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llwlparammanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llwlparammanager.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/linden/indra/newview/llwlparammanager.cpp b/linden/indra/newview/llwlparammanager.cpp
index 31471d7..8007cce 100644
--- a/linden/indra/newview/llwlparammanager.cpp
+++ b/linden/indra/newview/llwlparammanager.cpp
@@ -71,11 +71,13 @@
71#include "llviewerinventory.h" 71#include "llviewerinventory.h"
72#include "llviewerregion.h" 72#include "llviewerregion.h"
73#include "llassetuploadresponders.h" 73#include "llassetuploadresponders.h"
74#include "llframetimer.h"
74 75
75#include "curl/curl.h" 76#include "curl/curl.h"
76 77
77LLWLParamManager * LLWLParamManager::sInstance = NULL; 78LLWLParamManager * LLWLParamManager::sInstance = NULL;
78std::vector<LLWLPresetsObserver*> LLWLParamManager::sObservers; 79std::vector<LLWLPresetsObserver*> LLWLParamManager::sObservers;
80LLFrameTimer wlSmoothTransitionTimer;
79 81
80LLWLParamManager::LLWLParamManager() : 82LLWLParamManager::LLWLParamManager() :
81 83
@@ -562,6 +564,46 @@ void LLWLParamManager::update(LLViewerCamera * cam)
562 } 564 }
563 } 565 }
564 } 566 }
567
568 //Mix windlight settings if needed
569 if(sNeedsMix == TRUE)
570 {
571 if(sMixSet == NULL)
572 {
573 sNeedsMix = FALSE;
574 return;
575 }
576 if (wlSmoothTransitionTimer.getElapsedTimeF32() >=
577 (sMixTime / 100)) //100 steps inbetween
578 {
579 wlSmoothTransitionTimer.reset();
580 mCurParams.mix(mCurParams, *sMixSet, sMixCount / 100);//.01 to 1.0
581 }
582 sMixCount++;
583 if((sMixCount / 100) == 1)
584 {
585 //All done
586 sNeedsMix = FALSE;
587 std::string wlSkyPresetName = "(Region settings)";
588 mCurParams.mName = wlSkyPresetName;
589 removeParamSet( wlSkyPresetName, true );
590 addParamSet( wlSkyPresetName, mCurParams );
591 savePreset( wlSkyPresetName );
592 mAnimator.mIsRunning = false;
593 mAnimator.mUseLindenTime = false;
594 loadPreset( wlSkyPresetName, true );
595 sMixSet = NULL;
596 }
597 }
598}
599
600void LLWLParamManager::SetMixTime(LLWLParamSet *mixSet, F32 mixTime)
601{
602 wlSmoothTransitionTimer.reset();
603 sNeedsMix = TRUE;
604 sMixSet = mixSet;
605 sMixTime = mixTime;
606 sMixCount = 1;
565} 607}
566 608
567// static 609// static