[RLVa] Removal of z offset restrictions
This commit is contained in:
@@ -57,17 +57,6 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RestrainedLoveOffsetAvatarZ</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Offset the avatar.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.0</real>
|
||||
</map>
|
||||
<key>RestrainedLoveReplaceWhenFolderBeginsWith</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -978,6 +978,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// restoreMeshData()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1226,7 +1227,6 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view
|
||||
gRlvAttachmentLocks.updateLockedHUD();
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
}
|
||||
|
||||
return attachment;
|
||||
@@ -1239,24 +1239,20 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
// NOTE: RLVa event handlers should be invoked *before* LLVOAvatar::detachObject() calls LLViewerJointAttachment::removeObject()
|
||||
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
for (attachment_map_t::const_iterator itAttachPt = mAttachmentPoints.begin(); itAttachPt != mAttachmentPoints.end(); ++itAttachPt)
|
||||
{
|
||||
const LLViewerJointAttachment* pAttachPt = itAttachPt->second;
|
||||
if (pAttachPt->isObjectAttached(viewer_object))
|
||||
{
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
RlvAttachmentLockWatchdog::instance().onDetach(viewer_object, pAttachPt);
|
||||
gRlvHandler.onDetach(viewer_object, pAttachPt);
|
||||
}
|
||||
if (mAttachmentSignal)
|
||||
{
|
||||
(*mAttachmentSignal)(viewer_object, pAttachPt, ACTION_DETACH);
|
||||
}
|
||||
RlvAttachmentLockWatchdog::instance().onDetach(viewer_object, pAttachPt);
|
||||
gRlvHandler.onDetach(viewer_object, pAttachPt);
|
||||
}
|
||||
if (mAttachmentSignal)
|
||||
{
|
||||
(*mAttachmentSignal)(viewer_object, pAttachPt, ACTION_DETACH);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
@@ -1525,6 +1521,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const
|
||||
{
|
||||
const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
|
||||
@@ -3122,6 +3119,7 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// needsRenderBeam()
|
||||
//------------------------------------------------------------------------
|
||||
@@ -3257,14 +3255,6 @@ LLVector3 LLVOAvatarSelf::getLegacyAvatarOffset() const
|
||||
static LLCachedControl<F32> z_off("AscentAvatarZModifier");
|
||||
LLVector3 offset(x_off,y_off,z_off);
|
||||
|
||||
// [RLVa:KB] Custom blah blah
|
||||
if(rlv_handler_t::isEnabled())
|
||||
{
|
||||
F32 rlva_z_offs = RlvSettings::getAvatarOffsetZ();
|
||||
if(fabs(rlva_z_offs) > F_APPROXIMATELY_ZERO)
|
||||
offset.mV[VZ] = rlva_z_offs;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
if(on_pose_stand)
|
||||
offset.mV[VZ] += 7.5f;
|
||||
|
||||
|
||||
@@ -104,9 +104,6 @@ void RlvSettings::initClass()
|
||||
gSavedPerAccountSettings.getControl(RLV_SETTING_LOGINLASTLOCATION)->setHiddenFromSettingsEditor(true);
|
||||
#endif // RLV_EXTENSION_STARTLOCATION
|
||||
|
||||
if (gSavedSettings.controlExists(RLV_SETTING_AVATAROFFSET_Z))
|
||||
gSavedSettings.getControl(RLV_SETTING_AVATAROFFSET_Z)->getSignal()->connect(boost::bind(&onChangedAvatarOffset, _2));
|
||||
|
||||
if (gSavedSettings.controlExists(RLV_SETTING_TOPLEVELMENU))
|
||||
gSavedSettings.getControl(RLV_SETTING_TOPLEVELMENU)->getSignal()->connect(boost::bind(&onChangedMenuLevel));
|
||||
|
||||
|
||||
@@ -238,9 +238,9 @@ enum ERlvParamType {
|
||||
};
|
||||
|
||||
enum ERlvCmdRet {
|
||||
RLV_RET_UNKNOWN = 0x0000, // Unknown error (should only be used internally)
|
||||
RLV_RET_UNKNOWN = 0x0000, // Unknown error (should only be used internally)
|
||||
RLV_RET_RETAINED, // Command was retained
|
||||
RLV_RET_SUCCESS = 0x0100, // Command executed succesfully
|
||||
RLV_RET_SUCCESS = 0x0100, // Command executed succesfully
|
||||
RLV_RET_SUCCESS_UNSET, // Command executed succesfully (RLV_TYPE_REMOVE for an unrestricted behaviour)
|
||||
RLV_RET_SUCCESS_DUPLICATE, // Command executed succesfully (RLV_TYPE_ADD for an already restricted behaviour)
|
||||
RLV_RET_SUCCESS_DELAYED, // Command parsed valid but will execute at a later time
|
||||
@@ -252,6 +252,7 @@ enum ERlvCmdRet {
|
||||
RLV_RET_FAILED_DISABLED, // Command failed (command disabled by user)
|
||||
RLV_RET_FAILED_UNKNOWN, // Command failed (unknown command)
|
||||
RLV_RET_FAILED_NOSHAREDROOT, // Command failed (missing #RLV)
|
||||
RLV_RET_DEPRECATED // Command has been deprecated
|
||||
};
|
||||
|
||||
enum ERlvExceptionCheck
|
||||
@@ -263,17 +264,17 @@ enum ERlvExceptionCheck
|
||||
|
||||
enum ERlvLockMask
|
||||
{
|
||||
RLV_LOCK_ADD = 0x01,
|
||||
RLV_LOCK_REMOVE = 0x02,
|
||||
RLV_LOCK_ANY = RLV_LOCK_ADD | RLV_LOCK_REMOVE
|
||||
RLV_LOCK_ADD = 0x01,
|
||||
RLV_LOCK_REMOVE = 0x02,
|
||||
RLV_LOCK_ANY = RLV_LOCK_ADD | RLV_LOCK_REMOVE
|
||||
};
|
||||
|
||||
enum ERlvWearMask
|
||||
{
|
||||
RLV_WEAR_LOCKED = 0x00, // User can not wear the item at all
|
||||
RLV_WEAR_ADD = 0x01, // User can wear the item in addition to what's already worn
|
||||
RLV_WEAR_LOCKED = 0x00, // User can not wear the item at all
|
||||
RLV_WEAR_ADD = 0x01, // User can wear the item in addition to what's already worn
|
||||
RLV_WEAR_REPLACE = 0x02, // User can wear the item and replace what's currently worn
|
||||
RLV_WEAR = 0x03 // Convenience: combines RLV_WEAR_ADD and RLV_WEAR_REPLACE
|
||||
RLV_WEAR = 0x03 // Convenience: combines RLV_WEAR_ADD and RLV_WEAR_REPLACE
|
||||
};
|
||||
|
||||
enum ERlvAttachGroupType
|
||||
@@ -293,7 +294,6 @@ enum ERlvAttachGroupType
|
||||
|
||||
#define RLV_SETTING_MAIN "RestrainedLove"
|
||||
#define RLV_SETTING_DEBUG "RestrainedLoveDebug"
|
||||
#define RLV_SETTING_AVATAROFFSET_Z "RestrainedLoveOffsetAvatarZ"
|
||||
#define RLV_SETTING_CANOOC "RestrainedLoveCanOOC"
|
||||
#define RLV_SETTING_FORBIDGIVETORLV "RestrainedLoveForbidGiveToRLV"
|
||||
#define RLV_SETTING_NOSETENV "RestrainedLoveNoSetEnv"
|
||||
|
||||
@@ -1606,20 +1606,8 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const
|
||||
case RLV_BHVR_SIT: // @sit:<option>=force
|
||||
eRet = onForceSit(rlvCmd);
|
||||
break;
|
||||
case RLV_BHVR_ADJUSTHEIGHT: // @adjustheight:<options>=force - Checked: 2011-03-28 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
|
||||
{
|
||||
RlvCommandOptionAdjustHeight rlvCmdOption(rlvCmd);
|
||||
VERIFY_OPTION(rlvCmdOption.isValid());
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
F32 nValue = (rlvCmdOption.m_nPelvisToFoot - gAgentAvatarp->getPelvisToFoot()) * rlvCmdOption.m_nPelvisToFootDeltaMult;
|
||||
nValue += rlvCmdOption.m_nPelvisToFootOffset;
|
||||
if (!gAgentAvatarp->isUsingServerBakes())
|
||||
gSavedSettings.setF32(RLV_SETTING_AVATAROFFSET_Z, llclamp<F32>(nValue, -1.0f, 1.0f));
|
||||
else
|
||||
eRet = RLV_RET_FAILED_DISABLED;
|
||||
}
|
||||
}
|
||||
case RLV_BHVR_ADJUSTHEIGHT: // @adjustheight:<options>=force
|
||||
eRet = RLV_RET_DEPRECATED;
|
||||
break;
|
||||
case RLV_BHVR_TPTO: // @tpto:<option>=force - Checked: 2011-03-28 (RLVa-1.3.0f) | Modified: RLVa-1.3.0f
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user