summaryrefslogtreecommitdiff
path: root/indra/newview/llsky.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-12-10 17:35:29 +0200
committermaxim_productengine <mnikolenko@productengine.com>2018-12-10 17:35:29 +0200
commitca336f26db4446b016ab89654bf75f7651294533 (patch)
tree55a447b277575a8c673d75041497b99aaa92c151 /indra/newview/llsky.cpp
parentcf7658ca3b7731e83ebf424b9c4b7a4c36ce328f (diff)
SL-9698 [EEP] Add beacons that point to sun & moon position
Diffstat (limited to 'indra/newview/llsky.cpp')
-rw-r--r--indra/newview/llsky.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp
index 0740878901..71de99b4ec 100644
--- a/indra/newview/llsky.cpp
+++ b/indra/newview/llsky.cpp
@@ -52,7 +52,7 @@
#include "llcubemap.h"
#include "llviewercontrol.h"
#include "llenvironment.h"
-
+#include "llvoavatarself.h"
#include "llvowlsky.h"
F32 azimuth_from_vector(const LLVector3 &v);
@@ -234,6 +234,23 @@ void LLSky::setWind(const LLVector3& average_wind)
}
}
+void LLSky::addSunMoonBeacons()
+{
+ if (!gAgentAvatarp || !mVOSkyp) return;
+
+ static LLUICachedControl<bool> show_sun_beacon("sunbeacon", false);
+ static LLUICachedControl<bool> show_moon_beacon("moonbeacon", false);
+
+ if (show_sun_beacon)
+ {
+ renderSunMoonBeacons(gAgentAvatarp->getPositionAgent(), mVOSkyp->getSun().getDirection(), LLColor4(1.f, 0.5f, 0.f, 0.5f));
+ }
+ if (show_moon_beacon)
+ {
+ renderSunMoonBeacons(gAgentAvatarp->getPositionAgent(), mVOSkyp->getMoon().getDirection(), LLColor4(1.f, 0.f, 0.8f, 0.5f));
+ }
+}
+
//////////////////////////////////////////////////////////////////////
// Private Methods
//////////////////////////////////////////////////////////////////////