summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llinventory/llsettingssky.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index cac363b510..7da3a336cc 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -917,12 +917,22 @@ namespace
LLVector3 body_al(0.f, body_vector[1], body_vector[2]);
if (fabs(body_az.normalize()) > 0.001)
+ {
azimuth = angle_between(DUE_EAST, body_az);
+ if (body_az[1] < 0.0f)
+ azimuth = F_TWO_PI - azimuth;
+ }
else
azimuth = 0.0f;
if (fabs(body_al.normalize()) > 0.001)
+ {
altitude = angle_between(DUE_EAST, body_al);
+ if (body_al[2] < 0.0f)
+ {
+ altitude = F_TWO_PI - altitude;
+ }
+ }
else
altitude = 0.0f;
}