From c372dd36a89d41d53c4b30d6fa8142da6fc12b3f Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 28 Mar 2016 20:00:15 +0200 Subject: [PATCH] Refactoring carousel: combine all the different force-wear commands into one virtual RLV_CMD_FORCEWEAR command --HG-- branch : RLVa --- indra/newview/rlvdefines.h | 12 +--- indra/newview/rlvhandler.cpp | 91 ++++++++++------------------- indra/newview/rlvhandler.h | 4 +- indra/newview/rlvhelper.cpp | 109 +++++++++++++++++++---------------- indra/newview/rlvhelper.h | 38 ++++++++---- 5 files changed, 118 insertions(+), 136 deletions(-) diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index 1829dec818..e5d2dc9fb2 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -117,7 +117,6 @@ const S32 RLVa_VERSION_BUILD = 0; // NOTE: any changes to this enumeration should be reflected in the RlvBehaviourDictionary constructor enum ERlvBehaviour { RLV_BHVR_DETACH = 0, // "detach" - RLV_BHVR_ATTACH, // "attach" RLV_BHVR_ADDATTACH, // "addattach" RLV_BHVR_REMATTACH, // "remattach" RLV_BHVR_ADDOUTFIT, // "addoutfit" @@ -190,20 +189,10 @@ enum ERlvBehaviour { RLV_BHVR_ALWAYSRUN, // "alwaysrun" RLV_BHVR_TEMPRUN, // "temprun" RLV_BHVR_DETACHME, // "detachme" - RLV_BHVR_ATTACHOVER, // "attachover" RLV_BHVR_ATTACHTHIS, // "attachthis" - RLV_BHVR_ATTACHTHISOVER, // "attachthisover" RLV_BHVR_ATTACHTHISEXCEPT, // "attachthis_except" RLV_BHVR_DETACHTHIS, // "detachthis" RLV_BHVR_DETACHTHISEXCEPT, // "detachthis_except" - RLV_BHVR_ATTACHALL, // "attachall" - RLV_BHVR_ATTACHALLOVER, // "attachallover" - RLV_BHVR_DETACHALL, // "detachall" - RLV_BHVR_ATTACHALLTHIS, // "attachallthis" - RLV_BHVR_ATTACHALLTHISEXCEPT, // "attachallthis_except" - RLV_BHVR_ATTACHALLTHISOVER, // "attachallthisover" - RLV_BHVR_DETACHALLTHIS, // "detachallthis" - RLV_BHVR_DETACHALLTHISEXCEPT, // "detachallthis_except" RLV_BHVR_ADJUSTHEIGHT, // "adjustheight" RLV_BHVR_TPTO, // "tpto" RLV_BHVR_VERSION, // "version" @@ -228,6 +217,7 @@ enum ERlvBehaviour { RLV_BHVR_GETCOMMAND, // "getcommand" RLV_BHVR_GETSTATUS, // "getstatus" RLV_BHVR_GETSTATUSALL, // "getstatusall" + RLV_CMD_FORCEWEAR, // Internal representation of all force wear commands RLV_BHVR_COUNT, RLV_BHVR_UNKNOWN diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index a1db184188..2e6c54d6c2 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1155,14 +1155,10 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd) break; case RLV_BHVR_ATTACHTHIS: // @attachthis[: