From 8082cb86682c008389cb8127f295e6566ec368e5 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Fri, 18 May 2018 23:14:56 +0100 Subject: Make nighttime elev constant _SIN, since it uses a sin value. Put that constant in sky settings and eliminate dups. Fix up logic around when to use heavenly bodies (fix broken moon in basic sky). Remove unnecessary clip to horizon. Put in temp code to ena/dis sun/moon based on LLEnvironment::getIsDaytime(). --- indra/newview/llenvironment.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llenvironment.cpp') diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index d878bd9abe..d37cbfc76d 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -190,7 +190,6 @@ const F32Seconds LLEnvironment::TRANSITION_DEFAULT(5.0f); const F32Seconds LLEnvironment::TRANSITION_SLOW(10.0f); const F32 LLEnvironment::SUN_DELTA_YAW(F_PI); // 180deg -const F32 LLEnvironment::NIGHTTIME_ELEVATION_COS(LLSky::NIGHTTIME_ELEVATION_COS); //------------------------------------------------------------------------- LLEnvironment::LLEnvironment(): @@ -380,7 +379,7 @@ F32 LLEnvironment::getWaterHeight() const bool LLEnvironment::getIsDayTime() const { - return mCurrentEnvironment->getSky()->getSunDirection().mV[2] > NIGHTTIME_ELEVATION_COS; + return mCurrentEnvironment->getSky()->getSunDirection().mV[2] > NIGHTTIME_ELEVATION_SIN; } //------------------------------------------------------------------------- -- cgit v1.3