From d1cfe54bd9e2ca54a3f8aea028cb5e7c7b9d5bcd Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 25 Jan 2014 09:44:42 -0500 Subject: [PATCH 1/5] Fix Issue 1344: Weird mesh distorted bug Animations require consistent names for points like Avatar Center between viewers To fix this, we now use Avatar Center instead of Root at the lower levels, but this is okay, we translate Avatar Center into Root at UI level! --- indra/newview/character/avatar_lad.xml | 2 +- indra/newview/llvoavatarself.cpp | 22 +++++++++---------- .../newview/skins/default/xui/de/strings.xml | 2 +- .../skins/default/xui/en-us/strings.xml | 2 +- .../newview/skins/default/xui/es/strings.xml | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index d65f1e09b..f33d06be1 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -408,7 +408,7 @@ id="40" group="6" pie_slice="4" - name="Root" + name="Avatar Center" joint="mRoot" position="0 0 0" rotation="0 0 0" diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ab2833220..e01998284 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -388,11 +388,11 @@ void LLVOAvatarSelf::buildContextMenus() LLMenuItemCallGL* item; // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) // We need the userdata param to disable options in this pie menu later on (Left Hand / Right Hand option) - item = new LLMenuItemCallGL(attachment->getName(), + item = new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), NULL, object_selected_and_point_valid, attachment); // [/RLVa:KB] -// item = new LLMenuItemCallGL(attachment->getName(), +// item = new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), // NULL, // object_selected_and_point_valid); item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", iter->first); @@ -425,7 +425,7 @@ void LLVOAvatarSelf::buildContextMenus() LLViewerJointAttachment* attachment = iter->second; if (attachment->getGroup() == i) { - gDetachPieMenu->addChild(new LLMenuItemCallGL(attachment->getName(), + gDetachPieMenu->addChild(new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), &handle_detach_from_avatar, object_attached, attachment)); attachment_found = TRUE; @@ -451,16 +451,16 @@ void LLVOAvatarSelf::buildContextMenus() LLMenuItemCallGL* item; // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) // We need the userdata param to disable options in this pie menu later on - item = new LLMenuItemCallGL(attachment->getName(), + item = new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), NULL, object_selected_and_point_valid, attachment); // [/RLVa:KB] -// item = new LLMenuItemCallGL(attachment->getName(), +// item = new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), // NULL, // object_selected_and_point_valid); item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", iter->first); gAttachScreenPieMenu->addChild(item); - gDetachScreenPieMenu->addChild(new LLMenuItemCallGL(attachment->getName(), + gDetachScreenPieMenu->addChild(new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), &handle_detach_from_avatar, object_attached, attachment)); } } @@ -482,13 +482,13 @@ void LLVOAvatarSelf::buildContextMenus() continue; } // RELEASE-RLVa: random comment because we want know if LL ever changes this to not include "attachment" as userdata - LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), + LLMenuItemCallGL* item = new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), NULL, &object_selected_and_point_valid, &attach_label, attachment); item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", iter->first); gAttachSubMenu->addChild(item); - gDetachSubMenu->addChild(new LLMenuItemCallGL(attachment->getName(), + gDetachSubMenu->addChild(new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), &handle_detach_from_avatar, object_attached, &detach_label, attachment)); } @@ -546,14 +546,14 @@ void LLVOAvatarSelf::buildContextMenus() { // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) // We need the userdata param to disable options in this pie menu later on - LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), + LLMenuItemCallGL* item = new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), NULL, object_selected_and_point_valid, attachment); // [/RLVa:KB] -// LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), +// LLMenuItemCallGL* item = new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), // NULL, object_selected_and_point_valid); gAttachBodyPartPieMenus[group]->addChild(item); item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", attach_index); - gDetachBodyPartPieMenus[group]->addChild(new LLMenuItemCallGL(attachment->getName(), + gDetachBodyPartPieMenus[group]->addChild(new LLMenuItemCallGL(LLTrans::getString(attachment->getName()), &handle_detach_from_avatar, object_attached, attachment)); if (!context) cur_pie_slice++; diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index af47a3311..d866f90c4 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -1955,7 +1955,7 @@ Where tag = tag string to match. Removes bot's matching the tag. Linke Brust Rechts Hals - Basis + Basis Ungültige Stelle für Anhang diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index 9d1da2465..7453a18f6 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -3231,7 +3231,7 @@ The Left Pec Right Pec Neck - Root + Root Invalid Attachment Point diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index c96fa3378..228ef4642 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -3746,7 +3746,7 @@ Where tag = tag string to match. Removes bot's matching the tag. Pectoral Izquierdo Pectoral Derecho Cuello - Base + Base Punto de anexión inválido From 63ff4e281b3807ae7f53552147698a1e58dc545f Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Sat, 25 Jan 2014 22:31:08 +0100 Subject: [PATCH 2/5] Revert "focusFirstItem was no longer being overridden here, this function has proven not needed, thus." This reverts commit 655081365fde1fd54735e8d3f54b7c4615dda449. --- indra/newview/llimpanel.cpp | 11 +++++++++++ indra/newview/llimpanel.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 82fde5f31..abae430f6 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1576,6 +1576,17 @@ const bool LLFloaterIMPanel::isModerator(const LLUUID& speaker_id) return false; } +BOOL LLFloaterIMPanel::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash ) +{ + if (getVisible() && mInputEditor->getVisible()) + { + setInputFocus(true); + return TRUE; + } + + return LLUICtrl::focusFirstItem(prefer_text_fields, focus_flash); +} + void LLFloaterIMPanel::onFocusReceived() { mNumUnreadMessages = 0; diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index cf7048a47..bee650d7b 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -94,6 +94,8 @@ public: void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); + BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE ); + void onFocusReceived(); void onInputEditorFocusReceived(); void onInputEditorKeystroke(LLLineEditor* caller); From c4a82fe0d169a7c588a72ef7890a39571f7c0633 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Tue, 28 Jan 2014 18:12:23 +0100 Subject: [PATCH 3/5] Version 1.8.5 --- indra/llcommon/llversionviewer.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llversionviewer.h.in b/indra/llcommon/llversionviewer.h.in index 9252cf4cd..68949cee3 100644 --- a/indra/llcommon/llversionviewer.h.in +++ b/indra/llcommon/llversionviewer.h.in @@ -35,7 +35,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 8; -const S32 LL_VERSION_PATCH = 4; +const S32 LL_VERSION_PATCH = 5; const S32 LL_VERSION_BUILD = ${vBUILD}; const char * const LL_CHANNEL = "${VIEWER_CHANNEL}"; From 58b7fe5fef00f19ef360a5aca240e17679607618 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Tue, 28 Jan 2014 16:28:03 -0600 Subject: [PATCH 4/5] Avoid potential buffer over-read in shader, overrun in application. --- .../app_settings/shaders/class1/avatar/objectSkinV.glsl | 2 +- indra/newview/lldrawpoolavatar.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl index 8eb5a977b..57129c3bd 100644 --- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl @@ -34,7 +34,7 @@ mat4 getObjectSkinnedTransform() vec4 w = fract(weight4); vec4 index = floor(weight4); - index = min(index, vec4(63.0)); + index = min(index, vec4(51.0)); index = max(index, vec4( 0.0)); float scale = 1.0/(w.x+w.y+w.z+w.w); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 77dbbaae2..d4962256e 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1570,7 +1570,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* LLMatrix4a mp[JOINT_COUNT]; LLMatrix4* mat = (LLMatrix4*) mp; - for (U32 j = 0; j < skin->mJointNames.size(); ++j) + U32 count = llmin((U32) skin->mJointNames.size(), (U32) JOINT_COUNT); + + for (U32 j = 0; j < count; ++j) { LLJoint* joint = avatar->getJoint(skin->mJointNames[j]); if (joint) From 2a812e0e81ac9b0f8c4fb73f2f1eeeb0a36c0aee Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Tue, 28 Jan 2014 23:59:05 +0100 Subject: [PATCH 5/5] Revert "Limit avatar physics to 20-40 simulation steps per second to avoid wonky integration" This reverts commit cde5b233530c3b43134039e8d8d5589b2daa28bf. --- indra/newview/llphysicsmotion.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index d681dbd69..6fc0ab438 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -45,8 +45,7 @@ typedef std::map controller_map_t; typedef std::map default_controller_map_t; #define MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION 0.f -#define TIME_ITERATION_STEP 0.05f -#define MINIMUM_UPDATE_TIMESTEP 0.025f +#define TIME_ITERATION_STEP 0.1f inline F64 llsgn(const F64 a) { @@ -593,7 +592,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) const F32 time_delta = time - mLastTime; // Don't update too frequently, to avoid precision errors from small time slices. - if (time_delta <= MINIMUM_UPDATE_TIMESTEP) + if (time_delta <= .01) { return FALSE; } @@ -890,4 +889,4 @@ void LLPhysicsMotion::reset() mCharacter->setVisualParamWeight((*iter).mParam,(*iter).mParam->getDefaultWeight()); } } -} +} \ No newline at end of file