Decoupled rlva/setting based z-offset from param based z-offset. This reverts questionable changes introduced in the recent rlva merge.
This commit is contained in:
@@ -465,10 +465,7 @@ void LLAvatarAppearance::computeBodySize()
|
|||||||
|
|
||||||
LLVector3 old_offset = mAvatarOffset;
|
LLVector3 old_offset = mAvatarOffset;
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
|
mAvatarOffset.mV[VZ] = getVisualParamWeight(11001);
|
||||||
mAvatarOffset = getAvatarOffset();
|
|
||||||
// [/RLVa:KB]
|
|
||||||
// mAvatarOffset.mV[VZ] = getVisualParamWeight(11001);
|
|
||||||
|
|
||||||
mPelvisToFoot = hip.mV[VZ] * pelvis_scale.mV[VZ] -
|
mPelvisToFoot = hip.mV[VZ] * pelvis_scale.mV[VZ] -
|
||||||
knee.mV[VZ] * hip_scale.mV[VZ] -
|
knee.mV[VZ] * hip_scale.mV[VZ] -
|
||||||
@@ -489,8 +486,8 @@ void LLAvatarAppearance::computeBodySize()
|
|||||||
new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH;
|
new_body_size.mV[VX] = DEFAULT_AGENT_DEPTH;
|
||||||
new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH;
|
new_body_size.mV[VY] = DEFAULT_AGENT_WIDTH;
|
||||||
|
|
||||||
//mAvatarOffset.mV[VX] = 0.0f;
|
mAvatarOffset.mV[VX] = 0.0f;
|
||||||
//mAvatarOffset.mV[VY] = 0.0f;
|
mAvatarOffset.mV[VY] = 0.0f;
|
||||||
|
|
||||||
if (new_body_size != mBodySize || old_offset != mAvatarOffset)
|
if (new_body_size != mBodySize || old_offset != mAvatarOffset)
|
||||||
{
|
{
|
||||||
@@ -499,13 +496,6 @@ void LLAvatarAppearance::computeBodySize()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
|
|
||||||
LLVector3 LLAvatarAppearance::getAvatarOffset() /*const*/
|
|
||||||
{
|
|
||||||
return LLVector3(0.f,0.f,getVisualParamWeight(11001));
|
|
||||||
}
|
|
||||||
// [/RLVa:KB]
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// parseSkeletonFile()
|
// parseSkeletonFile()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -150,9 +150,6 @@ protected:
|
|||||||
virtual void buildCharacter();
|
virtual void buildCharacter();
|
||||||
virtual BOOL loadAvatar();
|
virtual BOOL loadAvatar();
|
||||||
virtual void bodySizeChanged() = 0;
|
virtual void bodySizeChanged() = 0;
|
||||||
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
|
|
||||||
virtual LLVector3 getAvatarOffset() /*const*/;
|
|
||||||
// [/RLVa:KB]
|
|
||||||
|
|
||||||
BOOL setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num);
|
BOOL setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 ¤t_volume_num, S32 ¤t_joint_num);
|
||||||
BOOL allocateCharacterJoints(U32 num);
|
BOOL allocateCharacterJoints(U32 num);
|
||||||
|
|||||||
@@ -116,10 +116,10 @@ void LLPrefsAscentVan::onCommitClientTag(LLUICtrl* ctrl, void* userdata)
|
|||||||
//static
|
//static
|
||||||
void LLPrefsAscentVan::onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdata)
|
void LLPrefsAscentVan::onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdata)
|
||||||
{
|
{
|
||||||
if (!gAgent.getID().isNull())
|
//if (!gAgent.getID().isNull())
|
||||||
{
|
//{
|
||||||
gAgent.sendAgentSetAppearance();
|
// gAgent.sendAgentSetAppearance();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
|
|||||||
@@ -4527,23 +4527,7 @@ void LLAgent::sendAgentSetAppearance()
|
|||||||
// NOTE -- when we start correcting all of the other Havok geometry
|
// NOTE -- when we start correcting all of the other Havok geometry
|
||||||
// to compensate for the COLLISION_TOLERANCE ugliness we will have
|
// to compensate for the COLLISION_TOLERANCE ugliness we will have
|
||||||
// to tweak this number again
|
// to tweak this number again
|
||||||
LLVector3 body_size = gAgentAvatarp->mBodySize + gAgentAvatarp->mAvatarOffset;
|
LLVector3 body_size = gAgentAvatarp->mBodySize + gAgentAvatarp->getLegacyAvatarOffset();
|
||||||
|
|
||||||
static LLCachedControl<F32> x_off("AscentAvatarXModifier");
|
|
||||||
static LLCachedControl<F32> y_off("AscentAvatarYModifier");
|
|
||||||
static LLCachedControl<F32> z_off("AscentAvatarZModifier");
|
|
||||||
|
|
||||||
body_size.mV[VX] += x_off;
|
|
||||||
body_size.mV[VY] += y_off;
|
|
||||||
// [RLVa:KB] - Checked: 2010-10-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
|
|
||||||
if (rlv_handler_t::isEnabled())
|
|
||||||
{
|
|
||||||
F32 rlvz_off = RlvSettings::getAvatarOffsetZ();
|
|
||||||
body_size.mV[VZ] += fabs(rlvz_off) ? rlvz_off : z_off;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
// [/RLVa:KB]
|
|
||||||
body_size.mV[VZ] += z_off;
|
|
||||||
|
|
||||||
msg->addVector3Fast(_PREHASH_Size, body_size);
|
msg->addVector3Fast(_PREHASH_Size, body_size);
|
||||||
|
|
||||||
|
|||||||
@@ -454,15 +454,12 @@ bool on_pose_stand;
|
|||||||
|
|
||||||
void set_current_pose(std::string anim)
|
void set_current_pose(std::string anim)
|
||||||
{
|
{
|
||||||
if (!on_pose_stand)
|
on_pose_stand = true;
|
||||||
{
|
|
||||||
on_pose_stand = true;
|
|
||||||
gSavedSettings.setF32("AscentAvatarZModifier", gSavedSettings.getF32("AscentAvatarZModifier") + 7.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
|
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
|
||||||
current_pose.set(anim);
|
current_pose.set(anim);
|
||||||
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
|
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_START);
|
||||||
|
gAgent.sendAgentSetAppearance();
|
||||||
}
|
}
|
||||||
void handle_pose_stand(void*)
|
void handle_pose_stand(void*)
|
||||||
{
|
{
|
||||||
@@ -472,10 +469,10 @@ void handle_pose_stand_stop(void*)
|
|||||||
{
|
{
|
||||||
if (on_pose_stand)
|
if (on_pose_stand)
|
||||||
{
|
{
|
||||||
gSavedSettings.setF32("AscentAvatarZModifier", gSavedSettings.getF32("AscentAvatarZModifier") - 7.5);
|
|
||||||
on_pose_stand = false;
|
on_pose_stand = false;
|
||||||
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
|
gAgent.sendAnimationRequest(current_pose, ANIM_REQUEST_STOP);
|
||||||
current_pose = LLUUID::null;
|
current_pose = LLUUID::null;
|
||||||
|
gAgent.sendAgentSetAppearance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void cleanup_pose_stand(void)
|
void cleanup_pose_stand(void)
|
||||||
|
|||||||
@@ -3220,21 +3220,27 @@ void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
|
|||||||
apr_file_printf( file, "\n</wearable_info>\n" );
|
apr_file_printf( file, "\n</wearable_info>\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern bool on_pose_stand;
|
||||||
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
|
LLVector3 LLVOAvatarSelf::getLegacyAvatarOffset() const
|
||||||
LLVector3 LLVOAvatarSelf::getAvatarOffset() /*const*/
|
|
||||||
{
|
{
|
||||||
if(isUsingServerBakes())
|
static LLCachedControl<F32> x_off("AscentAvatarXModifier");
|
||||||
return LLAvatarAppearance::getAvatarOffset();
|
static LLCachedControl<F32> y_off("AscentAvatarYModifier");
|
||||||
else
|
static LLCachedControl<F32> z_off("AscentAvatarZModifier");
|
||||||
|
LLVector3 offset(x_off,y_off,z_off);
|
||||||
|
|
||||||
|
// [RLVa:KB] Custom blah blah
|
||||||
|
if(rlv_handler_t::isEnabled())
|
||||||
{
|
{
|
||||||
static LLCachedControl<F32> x_off("AscentAvatarXModifier");
|
F32 rlva_z_offs = RlvSettings::getAvatarOffsetZ();
|
||||||
static LLCachedControl<F32> y_off("AscentAvatarYModifier");
|
if(fabs(rlva_z_offs) > F_APPROXIMATELY_ZERO)
|
||||||
static LLCachedControl<F32> z_off("AscentAvatarZModifier");
|
offset.mV[VZ] = rlva_z_offs;
|
||||||
return LLVector3(x_off,y_off,z_off+RlvSettings::getAvatarOffsetZ());
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
if(on_pose_stand)
|
||||||
|
offset.mV[VZ] += 7.5f;
|
||||||
|
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLVOAvatarSelf::onChangeSelfInvisible(bool invisible)
|
void LLVOAvatarSelf::onChangeSelfInvisible(bool invisible)
|
||||||
|
|||||||
@@ -355,10 +355,8 @@ public:
|
|||||||
public:
|
public:
|
||||||
bool sendAppearanceMessage(LLMessageSystem *mesgsys) const;
|
bool sendAppearanceMessage(LLMessageSystem *mesgsys) const;
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
|
public:
|
||||||
protected:
|
LLVector3 getLegacyAvatarOffset() const;
|
||||||
/*virtual*/ LLVector3 getAvatarOffset() /*const*/;
|
|
||||||
// [/RLVa:KB]
|
|
||||||
|
|
||||||
/** Appearance
|
/** Appearance
|
||||||
** **
|
** **
|
||||||
|
|||||||
Reference in New Issue
Block a user