From 782a0cf81190449dbeaff6372cacc5d9b34fdcfa Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 23 Aug 2010 17:12:10 -0400 Subject: Fixed backwards compatibility so that orig Breast params are preserved. Cleaned up some code. Removed "Add" from right-click when multiwear is not permitted. --- indra/newview/character/avatar_lad.xml | 78 +++++++++++++++++----------------- indra/newview/llinventorybridge.cpp | 11 +++-- indra/newview/llvoavatar.cpp | 32 +++++++------- 3 files changed, 62 insertions(+), 59 deletions(-) diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 7dd15c67c7..e37ff1833d 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -4044,7 +4044,7 @@ + + + + - - - - edit_group="physics" label_min="Less" label_max="More" - value_default="1" + value_default="2" value_min="1" value_max="5" camera_elevation=".3" @@ -9121,7 +9121,7 @@ render_pass="bump"> label_max="More" value_default="0" value_min="0" - value_max="2" + value_max="1" camera_elevation=".3" camera_distance=".8"> @@ -9209,9 +9209,9 @@ render_pass="bump"> edit_group="physics" label_min="Less" label_max="More" - value_default="10" + value_default="0" value_min="0" - value_max="100" + value_max="10" camera_elevation=".3" camera_distance=".8"> @@ -9300,55 +9300,55 @@ render_pass="bump"> edit_group="physics" label_min="Less" label_max="More" - value_default="10" + value_default="0" value_min="0" - value_max="100" + value_max="10" camera_elevation=".3" camera_distance=".8"> - - + id="1087" /> + id="1088" /> diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a564059b87..27a01dd94f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4492,14 +4492,17 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else { items.push_back(std::string("Wearable And Object Wear")); - items.push_back(std::string("Wearable Add")); disabled_items.push_back(std::string("Take Off")); disabled_items.push_back(std::string("Wearable Edit")); } - if (gAgentWearables.isWearingWearableType(mWearableType) && - !LLWearableType::getAllowMultiwear(mWearableType)) + + if (LLWearableType::getAllowMultiwear(mWearableType)) { - disabled_items.push_back(std::string("Wearable Add")); + items.push_back(std::string("Wearable Add")); + if (gAgentWearables.getWearableCount(mWearableType) > 0) + { + disabled_items.push_back(std::string("Wearable Add")); + } } break; default: diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 80b10cc05e..ac1af83959 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -789,7 +789,7 @@ public: { if (!gSavedSettings.getBOOL("AvatarPhysics")) { - return FALSE; + return TRUE; } /* @@ -817,21 +817,21 @@ public: 6. Threshold for not setting param */ - mBreastMassParam = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Mass"))->getWeight(); - mBreastSmoothingParam = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Smoothing"))->getWeight(); - mBreastGravityParam = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Gravity"))->getWeight(); - - mBreastSpringParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Spring"))->getWeight(); - mBreastGainParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Gain"))->getWeight(); - mBreastDampingParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Damping"))->getWeight(); - mBreastMaxVelocityParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Range"))->getWeight(); - mBreastDragParam[0] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_Side_Drag"))->getWeight(); - - mBreastSpringParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Spring"))->getWeight(); - mBreastGainParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Gain"))->getWeight(); - mBreastDampingParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Damping"))->getWeight(); - mBreastMaxVelocityParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Range"))->getWeight(); - mBreastDragParam[2] = ((LLViewerVisualParam*)mCharacter->getVisualParam("Breast_Physics_UpDown_Drag"))->getWeight(); + mBreastMassParam = mCharacter->getVisualParamWeight("Breast_Physics_Mass"); + mBreastSmoothingParam = mCharacter->getVisualParamWeight("Breast_Physics_Smoothing"); + mBreastGravityParam = mCharacter->getVisualParamWeight("Breast_Physics_Gravity"); + + mBreastSpringParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Spring"); + mBreastGainParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Gain"); + mBreastDampingParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Damping"); + mBreastMaxVelocityParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Range"); + mBreastDragParam[0] = mCharacter->getVisualParamWeight("Breast_Physics_Side_Drag"); + + mBreastSpringParam[2] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Spring"); + mBreastGainParam[2] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Gain"); + mBreastDampingParam[2] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Damping"); + mBreastMaxVelocityParam[2] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Range"); + mBreastDragParam[2] = mCharacter->getVisualParamWeight("Breast_Physics_UpDown_Drag"); if (mCharacter->getSex() != SEX_FEMALE) return TRUE; const F32 time_delta = calculateTimeDelta(); -- cgit v1.2.3