summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index d37cbfc76d..cc3a30d0b1 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -377,9 +377,16 @@ F32 LLEnvironment::getWaterHeight() const
return gAgent.getRegion()->getWaterHeight();
}
-bool LLEnvironment::getIsDayTime() const
+bool LLEnvironment::getIsSunUp() const
{
- return mCurrentEnvironment->getSky()->getSunDirection().mV[2] > NIGHTTIME_ELEVATION_SIN;
+ LLVector3 sunDir = mCurrentEnvironment->getSky()->getSunDirection();
+ return sunDir.mV[2] > NIGHTTIME_ELEVATION_SIN;
+}
+
+bool LLEnvironment::getIsMoonUp() const
+{
+ LLVector3 moonDir = mCurrentEnvironment->getSky()->getMoonDirection();
+ return moonDir.mV[2] > NIGHTTIME_ELEVATION_SIN;
}
//-------------------------------------------------------------------------