diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 63c71990a..fd94b8485 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -463,6 +463,10 @@ void LLAvatarAppearance::computeBodySize() LLVector3 foot = mFootLeftp->getPosition(); + F32 old_offset = mAvatarOffset.mV[VZ]; + + mAvatarOffset.mV[VZ] = getVisualParamWeight(11001); + mPelvisToFoot = hip.mV[VZ] * pelvis_scale.mV[VZ] - knee.mV[VZ] * hip_scale.mV[VZ] - ankle.mV[VZ] * knee_scale.mV[VZ] - @@ -482,7 +486,10 @@ void LLAvatarAppearance::computeBodySize() new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH; new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH; - if (new_body_size != mBodySize) + mAvatarOffset.mV[VX] = 0.0f; + mAvatarOffset.mV[VY] = 0.0f; + + if (new_body_size != mBodySize || old_offset != mAvatarOffset.mV[VZ]) { mBodySize = new_body_size; bodySizeChanged(); diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 21a813cc8..93758b54c 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -165,6 +165,7 @@ protected: //-------------------------------------------------------------------- public: LLVector3 mBodySize; + LLVector3 mAvatarOffset; protected: F32 mPelvisToFoot; diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index e6f628436..44e0bdef8 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -504,7 +504,7 @@ BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, } while (input_stream.good() && buffer[0]=='\0'); - return input_stream.good(); + return (buffer[0] != '\0'); } @@ -826,4 +826,4 @@ std::string terse_F32_to_string(F32 f) r.erase(0, 1); } return r; -} \ No newline at end of file +} diff --git a/indra/newview/app_settings/settings_sh.xml b/indra/newview/app_settings/settings_sh.xml index dedf2e435..7d65a20d8 100644 --- a/indra/newview/app_settings/settings_sh.xml +++ b/indra/newview/app_settings/settings_sh.xml @@ -50,7 +50,7 @@ Type U32 Value - 15000 + 6000 SHFMODExDecodeBufferSize diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 23d23b5c2..3afea9027 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -823,6 +823,23 @@ + + + + + mBodySize.mV[VZ]; + agent_pos.mV[VZ] -= 0.5f * (gAgentAvatarp->mBodySize.mV[VZ] + gAgentAvatarp->mAvatarOffset.mV[VZ]); } agent_pos.mV[VX] = llclamp( agent_pos.mV[VX], INSET, REGION_WIDTH - INSET ); @@ -4527,7 +4527,7 @@ void LLAgent::sendAgentSetAppearance() // NOTE -- when we start correcting all of the other Havok geometry // to compensate for the COLLISION_TOLERANCE ugliness we will have // to tweak this number again - LLVector3 body_size = gAgentAvatarp->mBodySize; + LLVector3 body_size = gAgentAvatarp->mBodySize + gAgentAvatarp->mAvatarOffset; static LLCachedControl x_off("AscentAvatarXModifier"); static LLCachedControl y_off("AscentAvatarYModifier"); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 60a3788d6..d92722f01 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3404,7 +3404,7 @@ public: virtual AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return requestAgentUpdateAppearance_timeout; } RequestAgentUpdateAppearanceResponder() { - mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 16.0, 2.0, 5); + mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 32.0, 2.0, 10); } virtual ~RequestAgentUpdateAppearanceResponder() diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 34b8785c9..1481f49b4 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -190,7 +190,7 @@ LLVector3d LLAvatarTracker::getGlobalPos() global_pos = avatarp->getPositionGlobal(); // HACK - for making the tracker point above the avatar's head // rather than its groin - global_pos.mdV[VZ] += 0.7f * avatarp->mBodySize.mV[VZ]; + global_pos.mdV[VZ] += 0.7f * (avatarp->mBodySize.mV[VZ] + avatarp->mAvatarOffset.mV[VZ]); mTrackingData->mGlobalPositionEstimate = global_pos; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5ed1a2aa1..c3be38b63 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2462,7 +2462,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) { LLVector3 tagPos = mRoot->getWorldPosition(); tagPos[VZ] -= mPelvisToFoot; - tagPos[VZ] += ( mBodySize[VZ] + 0.125f ); + tagPos[VZ] += ( mBodySize[VZ] + mAvatarOffset[VZ] + 0.125f ); mVoiceVisualizer->setVoiceSourceWorldPosition( tagPos ); } }//if ( voiceEnabled ) @@ -3422,12 +3422,12 @@ LLVector3 LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last) local_camera_up.normalize(); local_camera_up = local_camera_up * ~root_rot; - local_camera_up.scaleVec(mBodySize * 0.5f); - local_camera_at.scaleVec(mBodySize * 0.5f); + local_camera_up.scaleVec((mBodySize + mAvatarOffset) * 0.5f); + local_camera_at.scaleVec((mBodySize + mAvatarOffset) * 0.5f); LLVector3 name_position = mRoot->getWorldPosition(); name_position[VZ] -= mPelvisToFoot; - name_position[VZ] += (mBodySize[VZ]* 0.55f); + name_position[VZ] += ((mBodySize[VZ] + mAvatarOffset[VZ])* 0.55f); name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av)); name_position += pixel_up_vec * 15.f; @@ -3757,6 +3757,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } root_pos = gAgent.getPosGlobalFromAgent(getRenderPosition()); + root_pos.mdV[VZ] += getVisualParamWeight(11001); + resolveHeightGlobal(root_pos, ground_under_pelvis, normal); F32 foot_to_ground = (F32) (root_pos.mdV[VZ] - mPelvisToFoot - ground_under_pelvis.mdV[VZ]); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 6ce7fd2e5..29c040116 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1966,19 +1966,41 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() BOOL LLVOAvatarSelf::getIsCloud() const { - // do we have our body parts? - if (gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE) == 0 || - gAgentWearables.getWearableCount(LLWearableType::WT_HAIR) == 0 || - gAgentWearables.getWearableCount(LLWearableType::WT_EYES) == 0 || - gAgentWearables.getWearableCount(LLWearableType::WT_SKIN) == 0) + // Let people know why they're clouded without spamming them into oblivion. + bool do_warn = false; + static LLTimer time_since_notice; + F32 update_freq = 30.0; + if (time_since_notice.getElapsedTimeF32() > update_freq) { - lldebugs << "No body parts" << llendl; + time_since_notice.reset(); + do_warn = true; + } + + // do we have our body parts? + S32 shape_count = gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE); + S32 hair_count = gAgentWearables.getWearableCount(LLWearableType::WT_HAIR); + S32 eye_count = gAgentWearables.getWearableCount(LLWearableType::WT_EYES); + S32 skin_count = gAgentWearables.getWearableCount(LLWearableType::WT_SKIN); + if (!shape_count || !hair_count || !eye_count || !skin_count) + { + if (do_warn) + { + llinfos << "Self is clouded due to missing one or more required body parts: " + << (shape_count ? "" : "SHAPE ") + << (hair_count ? "" : "HAIR ") + << (eye_count ? "" : "EYES ") + << (skin_count ? "" : "SKIN ") + << llendl; + } return TRUE; } if (!isTextureDefined(TEX_HAIR, 0)) { - lldebugs << "No hair texture" << llendl; + if (do_warn) + { + llinfos << "Self is clouded because of no hair texture" << llendl; + } return TRUE; } @@ -1987,14 +2009,20 @@ BOOL LLVOAvatarSelf::getIsCloud() const if (!isLocalTextureDataAvailable(getLayerSet(BAKED_LOWER)) && (!isTextureDefined(TEX_LOWER_BAKED, 0))) { - lldebugs << "Lower textures not baked" << llendl; + if (do_warn) + { + llinfos << "Self is clouded because lower textures not baked" << llendl; + } return TRUE; } if (!isLocalTextureDataAvailable(getLayerSet(BAKED_UPPER)) && (!isTextureDefined(TEX_UPPER_BAKED, 0))) { - lldebugs << "Upper textures not baked" << llendl; + if (do_warn) + { + llinfos << "Self is clouded because upper textures not baked" << llendl; + } return TRUE; } @@ -2011,7 +2039,11 @@ BOOL LLVOAvatarSelf::getIsCloud() const const LLViewerTexture* baked_img = getImage( texture_data.mTextureIndex, 0 ); if (!baked_img || !baked_img->hasGLTexture()) { - lldebugs << "Texture at index " << i << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl; + if (do_warn) + { + llinfos << "Self is clouded because texture at index " << i + << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << llendl; + } return TRUE; } } @@ -2959,8 +2991,9 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch) gAgentAvatarp->idleUpdateAppearanceAnimation(); #endif - gAgentAvatarp->invalidateAll(); - gAgentAvatarp->updateMeshTextures(); + gAgentAvatarp->updateTextures(); // call updateTextureStats + gAgentAvatarp->invalidateAll(); // mark all bakes as dirty, request updates + gAgentAvatarp->updateMeshTextures(); // make sure correct textures are applied to the avatar mesh. } } @@ -2985,7 +3018,10 @@ void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch) gAgentCamera.resetView(); } - LLAppearanceMgr::instance().updateAppearanceFromCOF(); + if (gAgent.getRegion() && gAgent.getRegion()->getCentralBakeVersion()) + { + LLAppearanceMgr::instance().requestServerAppearanceUpdate(); + } } } diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 507ce57e7..ef1a953f5 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -249,6 +249,8 @@ LLViewerWearable* LLWearableList::createNewWearable( LLWearableType::EType type, perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER); wearable->setPermissions(perm); + wearable->setDefinitionVersion(LLWearable::getCurrentDefinitionVersion()); + // Description and sale info have default values. wearable->setParamsToDefaults(); wearable->setTexturesToDefaults(); diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index 84d4a47e1..ae998523f 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -3621,6 +3621,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Higher Hip Length Hip Width +Hover In Inner Shadow Color Inner Shadow Opacity diff --git a/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml b/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml index 45889993a..51ac9c574 100644 --- a/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml +++ b/indra/newview/skins/default/xui/en-us/wlfPanel_AdvSettings_expanded.xml @@ -2,7 +2,6 @@ -