From c9feefb714291fc80f9eadfda2e1ec5f68ad0a84 Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 28 Feb 2013 16:22:27 -0500 Subject: WIP: Removed caching of responder id. Code to dump the new and old seed caps when we receive multiple seedcaps for a region. --- indra/newview/llviewerregion.cpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 9a1c5f89ef..e940dda010 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -271,8 +271,8 @@ class BaseCapabilitiesCompleteTracker : public LLHTTPClient::Responder { LOG_CLASS(BaseCapabilitiesCompleteTracker); public: - BaseCapabilitiesCompleteTracker( U64 region_handle, S32 id ) - : mRegionHandle(region_handle), mID(id) + BaseCapabilitiesCompleteTracker( U64 region_handle) + : mRegionHandle(region_handle) { } virtual ~BaseCapabilitiesCompleteTracker() @@ -284,34 +284,40 @@ public: void result(const LLSD& content) { LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle); - if(!regionp || mID != regionp->getHttpResponderID()) - { + if( !regionp ) + { return ; } LLSD::map_const_iterator iter; for(iter = content.beginMap(); iter != content.endMap(); ++iter) { - regionp->setCapabilityDebug(iter->first, iter->second); + regionp->setCapabilityDebug(iter->first, iter->second); + //llinfos<<"BaseCapabilitiesCompleteTracker New Caps "<first<<" "<< iter->second<getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() ) { - llwarns<<"Sim sent duplicate seed caps that differs in size - most likely content."<getRegionImpl()->mCapabilities.begin(); + while (iter!=regionp->getRegionImpl()->mCapabilities.end() ) + { + llinfos<<"BaseCapabilitiesCompleteTracker Original "<first<<" "<< iter->second<getRegionImplNC()->mSecondCapabilitiesTracker.clear(); } } - static BaseCapabilitiesCompleteTracker* build( U64 region_handle, S32 id ) + static BaseCapabilitiesCompleteTracker* build( U64 region_handle ) { - return new BaseCapabilitiesCompleteTracker( region_handle, id ); + return new BaseCapabilitiesCompleteTracker( region_handle ); } private: - U64 mRegionHandle; - S32 mID; - + U64 mRegionHandle; }; @@ -1651,9 +1657,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) //to the "original" seed cap received and determine why there is problem! LLSD capabilityNames = LLSD::emptyArray(); mImpl->buildCapabilityNames( capabilityNames ); - S32 responderID = mImpl->mHttpResponderID+1; - - LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteTracker::build(getHandle(), responderID ), + LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteTracker::build(getHandle() ), LLSD(), CAP_REQUEST_TIMEOUT ); return; } -- cgit v1.2.3 From d1c144519306cae7eff7f781417482c85068988c Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 28 Feb 2013 17:25:37 -0500 Subject: SH-3909 Support avatar height offset Adding a new visual param that allows users to manually adjust an offset for how far off the ground (+ or -) their avatar's root bone is. Supports the +-2m range people are used to adjusting in their viewers, but new implementation should support server-generated appearances. --- indra/llappearance/llavatarappearance.cpp | 9 ++++++++- indra/llappearance/llavatarappearance.h | 1 + indra/newview/character/avatar_lad.xml | 17 +++++++++++++++++ indra/newview/llagent.cpp | 4 ++-- indra/newview/llcallingcard.cpp | 3 ++- indra/newview/llvoavatar.cpp | 10 ++++++---- indra/newview/skins/default/xui/en/strings.xml | 1 + 7 files changed, 37 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 89e64822f8..2d5744bb5e 100755 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -462,6 +462,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] - @@ -481,7 +485,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 11ea5e5a46..bce2540258 100755 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -160,6 +160,7 @@ protected: //-------------------------------------------------------------------- public: LLVector3 mBodySize; + LLVector3 mAvatarOffset; protected: F32 mPelvisToFoot; diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 2b090c4fa4..284e9c44b2 100755 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -1084,6 +1084,23 @@ scale="0 0 .5" /> + + + + + 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 ); @@ -4385,7 +4385,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 - const LLVector3 body_size = gAgentAvatarp->mBodySize; + const LLVector3 body_size = gAgentAvatarp->mBodySize + gAgentAvatarp->mAvatarOffset; msg->addVector3Fast(_PREHASH_Size, body_size); // To guard against out of order packets diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 0d55c4429a..0b8f863e75 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -183,7 +183,8 @@ LLVector3d LLAvatarTracker::getGlobalPos() global_pos = object->getPositionGlobal(); // HACK - for making the tracker point above the avatar's head // rather than its groin - global_pos.mdV[VZ] += 0.7f * ((LLVOAvatar *)object)->mBodySize.mV[VZ]; + LLVOAvatar* av = (LLVOAvatar*)object; + global_pos.mdV[VZ] += 0.7f * (av->mBodySize.mV[VZ] + av->mAvatarOffset.mV[VZ]); mTrackingData->mGlobalPositionEstimate = global_pos; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 266b9fecd5..aa90cbc5d2 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2061,7 +2061,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 ) @@ -2805,12 +2805,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; @@ -3110,6 +3110,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/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 4383b98592..883a06d5e1 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2991,6 +2991,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 -- cgit v1.2.3 From fa3f91e454ac82beffe4aca3789445e8ddf2b27f Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Thu, 28 Feb 2013 23:32:00 +0000 Subject: SH-3798 FIX avatar skins look dull Wearable parsing error caused last texture in some assets to fail to parse. Parser now does not throw an error if the wearable does not end in a newline --- indra/llappearance/llwearable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index 9fb8b7749f..4028c1dfad 100755 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -455,7 +455,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'); } -- cgit v1.2.3