aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvosky.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:48 -0500
committerJacek Antonelli2008-08-15 23:44:48 -0500
commit9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 (patch)
tree2f8ae193ab487088962e628f1ee9dee2f5901f01 /linden/indra/newview/llvosky.cpp
parentSecond Life viewer sources 1.13.2.12 (diff)
downloadmeta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.zip
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.gz
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.bz2
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.xz
Second Life viewer sources 1.13.2.15
Diffstat (limited to 'linden/indra/newview/llvosky.cpp')
-rw-r--r--linden/indra/newview/llvosky.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/linden/indra/newview/llvosky.cpp b/linden/indra/newview/llvosky.cpp
index 927b784..559e846 100644
--- a/linden/indra/newview/llvosky.cpp
+++ b/linden/indra/newview/llvosky.cpp
@@ -664,20 +664,18 @@ void LLVOSky::restoreGL()
664 664
665void LLVOSky::updateHaze() 665void LLVOSky::updateHaze()
666{ 666{
667 time_t timer; 667 static LLRandLagFib607 weather_generator(LLUUID::getRandomSeed());
668 time(&timer);
669 static LLRand WeatherRandomNumber(gmtime(&timer)->tm_mday);
670 if (gSavedSettings.getBOOL("FixedWeather")) 668 if (gSavedSettings.getBOOL("FixedWeather"))
671 { 669 {
672 WeatherRandomNumber.seed(8008135); 670 weather_generator.seed(8008135);
673 } 671 }
674 672
675 const F32 fo_upper_bound = 5; 673 const F32 fo_upper_bound = 5;
676 const F32 sca_upper_bound = 6; 674 const F32 sca_upper_bound = 6;
677 const F32 fo = 1 + WeatherRandomNumber.llfrand(fo_upper_bound - 1); 675 const F32 fo = 1 + (F32)weather_generator() *(fo_upper_bound - 1);
678 const static F32 upper = 0.5f / gFastLn.ln(fo_upper_bound); 676 const static F32 upper = 0.5f / gFastLn.ln(fo_upper_bound);
679 mHaze.setFalloff(fo); 677 mHaze.setFalloff(fo);
680 mHaze.setG(WeatherRandomNumber.llfrand(0.0f + upper * gFastLn.ln(fo))); 678 mHaze.setG((F32)weather_generator() * (0.0f + upper * gFastLn.ln(fo)));
681 LLColor3 sca; 679 LLColor3 sca;
682 const F32 cd = mCloudDensity * 3; 680 const F32 cd = mCloudDensity * 3;
683 F32 min_r = cd - 1; 681 F32 min_r = cd - 1;
@@ -691,7 +689,7 @@ void LLVOSky::updateHaze()
691 max_r = sca_upper_bound; 689 max_r = sca_upper_bound;
692 } 690 }
693 691
694 sca.mV[0] = min_r + WeatherRandomNumber.llfrand(max_r - min_r);//frand(6); 692 sca.mV[0] = min_r + (F32)weather_generator() * (max_r - min_r);
695 693
696 min_r = sca.mV[0] - 0.1f; 694 min_r = sca.mV[0] - 0.1f;
697 if (min_r < 0) 695 if (min_r < 0)
@@ -704,7 +702,7 @@ void LLVOSky::updateHaze()
704 max_r = sca_upper_bound; 702 max_r = sca_upper_bound;
705 } 703 }
706 704
707 sca.mV[1] = min_r + WeatherRandomNumber.llfrand(max_r - min_r); 705 sca.mV[1] = min_r + (F32)weather_generator() * (max_r - min_r);
708 706
709 min_r = sca.mV[1]; 707 min_r = sca.mV[1];
710 if (min_r < 0) 708 if (min_r < 0)
@@ -717,7 +715,7 @@ void LLVOSky::updateHaze()
717 max_r = sca_upper_bound; 715 max_r = sca_upper_bound;
718 } 716 }
719 717
720 sca.mV[2] = min_r + WeatherRandomNumber.llfrand(max_r - min_r); 718 sca.mV[2] = min_r + (F32)weather_generator() * (max_r - min_r);
721 719
722 sca = AIR_SCA_AVG * sca; 720 sca = AIR_SCA_AVG * sca;
723 721