summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvosky.cpp15
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_water.xml8
2 files changed, 17 insertions, 6 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 678f1fe748..96363045d3 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -1212,10 +1212,19 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const
S32 index_offset;
LLFace *facep;
+
LLQuaternion rot = hb.getRotation();
- LLVector3 to_dir = LLVector3::x_axis * rot;
- LLVector3 hb_right = LLVector3::y_axis_neg * rot;
- LLVector3 hb_up = LLVector3::z_axis * rot;
+ LLVector3 to_dir = LLVector3::x_axis * rot;
+
+ LLVector3 hb_right = to_dir % LLVector3::z_axis;
+ LLVector3 hb_up = hb_right % to_dir;
+
+ // at zenith so math below fails spectacularly
+ if ((to_dir * LLVector3::z_axis) > 0.99f)
+ {
+ hb_right = LLVector3::y_axis_neg * rot;
+ hb_up = LLVector3::z_axis * rot;
+ }
LLVector3 draw_pos = to_dir * HEAVENLY_BODY_DIST;
diff --git a/indra/newview/skins/default/xui/en/panel_settings_water.xml b/indra/newview/skins/default/xui/en/panel_settings_water.xml
index 88d0f7827b..1d4f980273 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_water.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_water.xml
@@ -82,7 +82,7 @@
width="150">
Underwater Modifier:</text>
<slider
- decimal_digits="1"
+ decimal_digits="2"
follows="left|top"
height="16"
increment="0.01"
@@ -194,10 +194,10 @@
top_delta="21"
min_val_x="-20"
max_val_x="20"
- increment_x="0.5f"
+ increment_x="0.01f"
min_val_y="-20"
max_val_y="20"
- increment_y="0.5f"
+ increment_y="0.01f"
arrow_color="white"/>
<text
@@ -220,6 +220,8 @@
max_val_x="20"
min_val_y="-20"
max_val_y="20"
+ increment_x="0.01f"
+ increment_y="0.01f"
arrow_color="white"/>
<text