summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 0861b439eb..dc2258644f 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -118,6 +118,8 @@
#include "llpanelplaceprofile.h"
#include "llviewerregion.h"
#include "llfloaterregionrestarting.h"
+#include "rlvactions.h"
+#include "rlvhandler.h"
#include "llnotificationmanager.h" //
#include "llexperiencecache.h"
@@ -2382,15 +2384,16 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
bool is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible);
+ bool show_script_chat_particles = chat.mSourceType == CHAT_SOURCE_OBJECT
+ && chat.mChatType != CHAT_TYPE_DEBUG_MSG
+ && gSavedSettings.getBOOL("EffectScriptChatParticles");
chatter = gObjectList.findObject(from_id);
if (chatter)
{
chat.mPosAgent = chatter->getPositionAgent();
// Make swirly things only for talking objects. (not script debug messages, though)
- if (chat.mSourceType == CHAT_SOURCE_OBJECT
- && chat.mChatType != CHAT_TYPE_DEBUG_MSG
- && gSavedSettings.getBOOL("EffectScriptChatParticles") )
+ if (show_script_chat_particles && (!RlvActions::isRlvEnabled() || CHAT_TYPE_OWNER != chat.mChatType) )
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);
@@ -2470,8 +2473,25 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
case CHAT_TYPE_WHISPER:
chat.mText = LLTrans::getString("whisper") + " ";
break;
- case CHAT_TYPE_DEBUG_MSG:
case CHAT_TYPE_OWNER:
+ if (RlvActions::isRlvEnabled())
+ {
+ if (RlvHandler::instance().handleSimulatorChat(mesg, chat, chatter))
+ {
+ break;
+ }
+ else if (show_script_chat_particles)
+ {
+ LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
+ psc->setSourceObject(chatter);
+ psc->setColor(color);
+ //We set the particles to be owned by the object's owner,
+ //just in case they should be muted by the mute list
+ psc->setOwnerUUID(owner_id);
+ LLViewerPartSim::getInstance()->addPartSource(psc);
+ }
+ }
+ case CHAT_TYPE_DEBUG_MSG:
case CHAT_TYPE_NORMAL:
case CHAT_TYPE_DIRECT:
break;