diff options
author | McCabe Maxsted | 2010-04-30 03:01:49 -0700 |
---|---|---|
committer | Jacek Antonelli | 2010-05-04 02:58:49 -0500 |
commit | 7f1a194ccf3f579de886bbbd157f78706829aa73 (patch) | |
tree | 9a9c0564410f5f49be09cbb819fcd4c2bd13d669 /linden/indra/newview | |
parent | Applied patch for SNOW-484 by Robin Cornelius: recursive animations can crash... (diff) | |
download | meta-impy-7f1a194ccf3f579de886bbbd157f78706829aa73.zip meta-impy-7f1a194ccf3f579de886bbbd157f78706829aa73.tar.gz meta-impy-7f1a194ccf3f579de886bbbd157f78706829aa73.tar.bz2 meta-impy-7f1a194ccf3f579de886bbbd157f78706829aa73.tar.xz |
Improved accuracy of avatar height calculation.
Uses values from SNOW-197 as they seem more accurate.
(Plus some code cleanup and compile fixes from Jacek.)
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/llfloatercustomize.cpp | 16 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/floater_customize.xml | 15 |
2 files changed, 21 insertions, 10 deletions
diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp index bfca034..4761491 100644 --- a/linden/indra/newview/llfloatercustomize.cpp +++ b/linden/indra/newview/llfloatercustomize.cpp | |||
@@ -1230,13 +1230,19 @@ void LLScrollingPanelParam::onSliderMoved(LLUICtrl* ctrl, void* userdata) | |||
1230 | LLFloaterCustomize* floater_customize = gFloaterCustomize; | 1230 | LLFloaterCustomize* floater_customize = gFloaterCustomize; |
1231 | if (!floater_customize) return; | 1231 | if (!floater_customize) return; |
1232 | 1232 | ||
1233 | //avatar height stuff -Patrick Sapinski (Wednesday, August 19, 2009) | 1233 | //avatar height stuff |
1234 | // Use the values in SNOW-197 as they seem more accurate -- MC | ||
1234 | LLVOAvatar* avatar = gAgent.getAvatarObject(); | 1235 | LLVOAvatar* avatar = gAgent.getAvatarObject(); |
1235 | F32 avatar_size = (avatar->mBodySize.mV[VZ]) + (F32)0.17; //mBodySize is actually quite a bit off. | 1236 | //mBodySize is actually quite a bit off. |
1237 | F32 avatar_size = (avatar->mBodySize.mV[VZ]) + (F32)0.195; | ||
1238 | int inches = (int)(avatar_size / .0254f); | ||
1239 | int feet = inches / 12; | ||
1240 | inches %= 12; | ||
1236 | 1241 | ||
1237 | floater_customize->getChild<LLTextBox>("HeightText")->setValue(llformat("%.2f", avatar_size) + "m"); | 1242 | floater_customize->getChild<LLTextBox>("HeightText")->\ |
1238 | floater_customize->getChild<LLTextBox>("HeightText2")->setValue(llformat("%.2f",llround(avatar_size / 0.3048)) + "'" | 1243 | setValue(llformat("%.2f", avatar_size) + "m"); |
1239 | + llformat("%.2f",llround(avatar_size * 39.37) % 12) + "\""); | 1244 | floater_customize->getChild<LLTextBox>("HeightText2")->\ |
1245 | setValue(llformat("%.2f' %.2f\"", feet, inches)); | ||
1240 | 1246 | ||
1241 | gAgent.getAvatarObject()->setVisualParamWeight( param, new_weight, FALSE); | 1247 | gAgent.getAvatarObject()->setVisualParamWeight( param, new_weight, FALSE); |
1242 | gAgent.getAvatarObject()->updateVisualParams(); | 1248 | gAgent.getAvatarObject()->updateVisualParams(); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_customize.xml b/linden/indra/newview/skins/default/xui/en-us/floater_customize.xml index b4710be..e947ecd 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_customize.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_customize.xml | |||
@@ -1115,24 +1115,29 @@ scratch and wear it. | |||
1115 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 1115 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
1116 | bottom="-400" drop_shadow_visible="true" follows="left|top" | 1116 | bottom="-400" drop_shadow_visible="true" follows="left|top" |
1117 | font="SansSerif" h_pad="0" halign="left" height="16" | 1117 | font="SansSerif" h_pad="0" halign="left" height="16" |
1118 | left="8" mouse_opaque="true" name="AvatarHeightText" v_pad="0" width="140"> | 1118 | left="4" mouse_opaque="true" name="AvatarHeightText" v_pad="0" width="140"> |
1119 | Avatar Height: | 1119 | Avatar Height: |
1120 | </text> | 1120 | </text> |
1121 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 1121 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
1122 | bottom_delta="-18" drop_shadow_visible="true" follows="left|top" | 1122 | bottom_delta="-18" drop_shadow_visible="true" follows="left|top" |
1123 | font="SansSerif" h_pad="0" halign="left" height="16" | 1123 | font="SansSerif" h_pad="0" halign="left" height="16" |
1124 | left="8" mouse_opaque="true" name="HeightText" v_pad="0" width="140"> | 1124 | left="4" mouse_opaque="true" name="HeightText" v_pad="0" width="140"> |
1125 | Avatar Height | 1125 | Avatar Height |
1126 | </text> | 1126 | </text> |
1127 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 1127 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
1128 | bottom_delta="-18" drop_shadow_visible="true" follows="left|top" | 1128 | bottom_delta="-18" drop_shadow_visible="true" follows="left|top" |
1129 | font="SansSerif" h_pad="0" halign="left" height="16" | 1129 | font="SansSerif" h_pad="0" halign="left" height="16" |
1130 | left="8" mouse_opaque="true" name="HeightText2" v_pad="0" width="140"> | 1130 | left="4" mouse_opaque="true" name="HeightText2" v_pad="0" width="140"> |
1131 | Avatar Height2 | 1131 | Avatar Height2 |
1132 | </text> | 1132 | </text> |
1133 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
1134 | bottom_delta="-18" drop_shadow_visible="true" follows="right|bottom" | ||
1135 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="4" | ||
1136 | mouse_opaque="true" name="includes_shoes" v_pad="0" width="150"> | ||
1137 | (includes shoes) | ||
1138 | </text> | ||
1133 | 1139 | ||
1134 | 1140 | <button name="Import" label="Import" | |
1135 | <button name="Import" label="Import" | ||
1136 | bottom="-536" left="10" height="20" width="70" | 1141 | bottom="-536" left="10" height="20" width="70" |
1137 | follows="right|bottom" font="SansSerif" halign="center" /> | 1142 | follows="right|bottom" font="SansSerif" halign="center" /> |
1138 | 1143 | ||