Merge remote-tracking branch 'origin/sunshine2'
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -165,6 +165,7 @@ protected:
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
LLVector3 mBodySize;
|
||||
LLVector3 mAvatarOffset;
|
||||
protected:
|
||||
F32 mPelvisToFoot;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>15000</integer>
|
||||
<integer>6000</integer>
|
||||
</map>
|
||||
<key>SHFMODExDecodeBufferSize</key>
|
||||
<map>
|
||||
|
||||
@@ -823,6 +823,23 @@
|
||||
<bone name="mNeck" 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
|
||||
|
||||
@@ -2310,7 +2310,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 );
|
||||
@@ -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<F32> x_off("AscentAvatarXModifier");
|
||||
static LLCachedControl<F32> y_off("AscentAvatarYModifier");
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -3621,6 +3621,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>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<panel bg_visible="false" border="false" border_visible="false" height="200" name="Adv_Settings" use_bounding_rect="true" width="220">
|
||||
<panel bottom="1" filename="panel_bg_tab.xml" height="197" width="197"/>
|
||||
<slider bottom="177" left="5" control_name="RenderFarClip" decimal_digits="0" height="20" increment="8" label="Draw Dist.:" can_edit_text="true" label_width="60" max_val="1024" min_val="24" val_width="36" name="DrawDistance" width="189" tool_tip="Change your Draw Distance"/>
|
||||
<slider bottom_delta="-20" control_name="AscentAvatarZModifier" height="20" increment=".001" label="Z Offset:" can_edit_text="true" label_width="60" max_val="5" min_val="-5" val_width="36" name="z_offset" width="189"/>
|
||||
<slider bottom_delta="-20" control_name="RenderMaxPartCount" decimal_digits="0" height="20" increment="256" label="Particles:" can_edit_text="true" label_width="60" max_val="8192" min_val="0" val_width="36" name="MaxParticleCount" width="189" tool_tip="Amount of particles to render"/>
|
||||
<slider bottom_delta="-20" control_name="RenderAvatarMaxVisible" decimal_digits="0" height="20" increment="1" label="Max Avs:" can_edit_text="true" label_width="60" max_val="50" min_val="1" val_width="36" name="RenderAvatarMaxVisible" width="189" tool_tip="How many avatars to fully render on screen. Lowering this greatly improves FPS in crowded situations. Requires Avatar Impostors to be on. [Default 35]"/>
|
||||
<slider bottom_delta="-20" control_name="RenderVolumeLODFactor" height="20" increment="0.125" label="Obj. Detail:" can_edit_text="true" label_width="60" max_val="4" min_val="0.5" name="Object Detail" val_width="36" width="189" tool_tip="Controls level of detail of primitives (multiplier for current screen area when calculated level of detail[0.5 to 2.0 is stable])"/>
|
||||
|
||||
Reference in New Issue
Block a user