summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-03-01 10:38:22 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-03-01 10:38:22 -0500
commite069e45012a06735f9d7f9bfae755ee995be4423 (patch)
tree3b9fddc14f6c4a48e4ed12d465576ae8098923c3
parent70e22de2bb9bf8515d7e3cd68c7328beb75409d6 (diff)
parentfa29880ecd1ca9fb34507e1b712b111a7a3bb63e (diff)
merge
-rwxr-xr-xindra/llappearance/llavatarappearance.cpp9
-rwxr-xr-xindra/llappearance/llavatarappearance.h1
-rwxr-xr-xindra/llappearance/llwearable.cpp2
-rwxr-xr-xindra/newview/character/avatar_lad.xml17
-rwxr-xr-xindra/newview/llagent.cpp4
-rw-r--r--indra/newview/llcallingcard.cpp3
-rwxr-xr-xindra/newview/llviewerregion.cpp32
-rwxr-xr-xindra/newview/llvoavatar.cpp10
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
9 files changed, 56 insertions, 23 deletions
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/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');
}
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" />
</param_skeleton>
</param>
+
+ <param
+ id="11001"
+ group="0"
+ name="Hover"
+ wearable="shape"
+ edit_group="shape_body"
+ edit_group_order="4"
+ label_min="Lower"
+ label_max="Higher"
+ value_min="-2"
+ value_max="2"
+ value_default="0"
+ camera_distance="2.5">
+ <param_skeleton />
+ </param>
+
</skeleton>
<mesh
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 6c082a7e9c..99b79aadc4 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2332,7 +2332,7 @@ void LLAgent::setStartPosition( U32 location_id )
if (isAgentAvatarValid())
{
// the z height is at the agent's feet
- agent_pos.mV[VZ] -= 0.5f * gAgentAvatarp->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 );
@@ -4381,7 +4381,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/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 "<<iter->first<<" "<< iter->second<<llendl;
}
if ( regionp->getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() )
{
- llwarns<<"Sim sent duplicate seed caps that differs in size - most likely content."<<llendl;
+ llinfos<<"BaseCapabilitiesCompleteTracker "<<"Sim sent duplicate seed caps that differs in size - most likely content."<<llendl;
//todo#add cap debug versus original check?
+ /*CapabilityMap::const_iterator iter = regionp->getRegionImpl()->mCapabilities.begin();
+ while (iter!=regionp->getRegionImpl()->mCapabilities.end() )
+ {
+ llinfos<<"BaseCapabilitiesCompleteTracker Original "<<iter->first<<" "<< iter->second<<llendl;
+ ++iter;
+ }
+ */
regionp->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;
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index afe8a037b7..f6fd8b2409 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2074,7 +2074,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 )
@@ -2818,12 +2818,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;
@@ -3123,6 +3123,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].
<string name="Higher">Higher</string>
<string name="Hip Length">Hip Length</string>
<string name="Hip Width">Hip Width</string>
+<string name="Hover">Hover</string>
<string name="In">In</string>
<string name="In Shdw Color">Inner Shadow Color</string>
<string name="In Shdw Opacity">Inner Shadow Opacity</string>