From 6a858d9d2ad64487b8723949b62925a4a7c9be1b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 28 Sep 2016 10:25:16 +0200 Subject: [PATCH] FIRE-20142 - RLVa: BehaviourCallback and BehaviourToggleCallback are not fired properly anymore if RLV command is handled by a command processor --- indra/newview/rlvhandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index e3a05245e2..2ff8dea406 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1194,15 +1194,20 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd) // * removed from the RlvObject (which still exists at this point even if this is the last restriction) // - the object's UUID may or may not exist in gObjectList (see handling of @detach=n|y) + ERlvBehaviour eBhvr = rlvCmd.getBehaviourType(); ERlvParamType eType = rlvCmd.getParamType(); + // Try a command processor first ERlvCmdRet eRet = rlvCmd.processCommand(); if (RLV_RET_NO_PROCESSOR != eRet) { + m_OnBehaviour(eBhvr, eType); + if ( ((RLV_TYPE_ADD == eType) && (1 == m_Behaviours[eBhvr])) || ((RLV_TYPE_REMOVE == eType) && (0 == m_Behaviours[eBhvr])) ) + m_OnBehaviourToggle(eBhvr, eType); + return eRet; } // Process the command the legacy way - ERlvBehaviour eBhvr = rlvCmd.getBehaviourType(); ERlvParamType eType = rlvCmd.getParamType(); eRet = RLV_RET_SUCCESS; bool fRefCount = false; const std::string& strOption = rlvCmd.getOption(); switch (eBhvr)