summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolgun.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolgun.cpp')
-rw-r--r--indra/newview/lltoolgun.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index 6c9155be85..9539081f30 100644
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -107,11 +107,18 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
if (gSavedSettings.getBOOL("MouseSun"))
{
- gSky.setSunDirection(LLViewerCamera::getInstance()->getAtAxis(), LLVector3(0.f, 0.f, 0.f));
- gSky.setOverrideSun(TRUE);
+ LLVector3 sunpos = LLViewerCamera::getInstance()->getAtAxis();
+ gSky.setSunDirectionCFR(sunpos);
gSavedSettings.setVector3("SkySunDefaultPosition", LLViewerCamera::getInstance()->getAtAxis());
}
+ if (gSavedSettings.getBOOL("MouseMoon"))
+ {
+ LLVector3 moonpos = LLViewerCamera::getInstance()->getAtAxis();
+ gSky.setMoonDirectionCFR(moonpos);
+ gSavedSettings.setVector3("SkyMoonDefaultPosition", LLViewerCamera::getInstance()->getAtAxis());
+ }
+
gViewerWindow->moveCursorToCenter();
gViewerWindow->hideCursor();
}