From 4dcf8f3f45d55f2064a3034bffaed3b267b2bbd2 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 28 Jan 2014 03:16:35 -0500 Subject: [PATCH] [RLVa] Removal of z offset restrictions --- indra/newview/app_settings/settings_rlv.xml | 11 -------- indra/newview/llvoavatarself.cpp | 30 +++++++-------------- indra/newview/rlvcommon.cpp | 3 --- indra/newview/rlvdefines.h | 18 ++++++------- indra/newview/rlvhandler.cpp | 16 ++--------- 5 files changed, 21 insertions(+), 57 deletions(-) diff --git a/indra/newview/app_settings/settings_rlv.xml b/indra/newview/app_settings/settings_rlv.xml index ca850aaca..09b3d15fd 100644 --- a/indra/newview/app_settings/settings_rlv.xml +++ b/indra/newview/app_settings/settings_rlv.xml @@ -57,17 +57,6 @@ Value 0 - RestrainedLoveOffsetAvatarZ - - Comment - Offset the avatar. - Persist - 1 - Type - F32 - Value - 0.0 - RestrainedLoveReplaceWhenFolderBeginsWith Comment diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index e01998284..6f0a4bd9f 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -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 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; diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index c274daa7e..b8cb2c05b 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -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)); diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index 58bf384c8..38a5264a5 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -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" diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 717847f1d..9a9a059ed 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1606,20 +1606,8 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const case RLV_BHVR_SIT: // @sit: