aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2011-03-10 09:16:09 +0100
committerArmin Weatherwax2011-03-10 09:16:09 +0100
commitd7b2279bbc76bd617074969fe7d4a8b5305a6f5b (patch)
treec832a8594babd6965430977e69478fda3ad54242 /linden/indra/newview/llvoavatar.cpp
parentfix llerrs crash "Vertex buffer destroyed while mapped!" in sse2 codepath (diff)
downloadmeta-impy-d7b2279bbc76bd617074969fe7d4a8b5305a6f5b.zip
meta-impy-d7b2279bbc76bd617074969fe7d4a8b5305a6f5b.tar.gz
meta-impy-d7b2279bbc76bd617074969fe7d4a8b5305a6f5b.tar.bz2
meta-impy-d7b2279bbc76bd617074969fe7d4a8b5305a6f5b.tar.xz
Tazy Scientist: Feature #759 Particle Chat Enhanced
script is here: http://redmine.kokuaviewer.org/attachments/164/script.txt I (ArminW) added also a ParticleChatCannel setting to Tazys patch.
Diffstat (limited to 'linden/indra/newview/llvoavatar.cpp')
-rw-r--r--linden/indra/newview/llvoavatar.cpp63
1 files changed, 35 insertions, 28 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index 27a848f..204357f 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -3929,7 +3929,7 @@ void LLVOAvatar::idleUpdateTractorBeam()
3929 msg->nextBlockFast(_PREHASH_ChatData); 3929 msg->nextBlockFast(_PREHASH_ChatData);
3930 msg->addStringFast(_PREHASH_Message, "stop"); 3930 msg->addStringFast(_PREHASH_Message, "stop");
3931 msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); 3931 msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER);
3932 msg->addS32("Channel", 9000); 3932 msg->addS32("Channel", gSavedSettings.getS32("ParticleChatChannel"));
3933 3933
3934 gAgent.sendReliableMessage(); 3934 gAgent.sendReliableMessage();
3935 sBeamLastAt = LLVector3d::zero; 3935 sBeamLastAt = LLVector3d::zero;
@@ -3949,53 +3949,58 @@ void LLVOAvatar::idleUpdateTractorBeam()
3949 if (!mBeam.isNull()) 3949 if (!mBeam.isNull())
3950 { 3950 {
3951 LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); 3951 LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
3952 LLViewerObject* obj_sel = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
3952 3953
3953 if (gAgent.mPointAt.notNull()) 3954 if (gAgent.mPointAt.notNull())
3954 { 3955 {
3955 // get point from pointat effect 3956 // get point from pointat effect
3956 mBeam->setPositionGlobal(gAgent.mPointAt->getPointAtPosGlobal()); 3957 mBeam->setPositionGlobal(gAgent.mPointAt->getPointAtPosGlobal());
3957 3958
3959 //lgg crap
3958 if(gSavedSettings.getBOOL("ParticleChat")) 3960 if(gSavedSettings.getBOOL("ParticleChat"))
3959 { 3961 {
3960 if(sPartsNow != TRUE) 3962 if(sPartsNow != TRUE)
3961 { 3963 {
3962 sPartsNow = TRUE; 3964
3963 LLMessageSystem* msg = gMessageSystem; 3965 sPartsNow = TRUE;
3964 msg->newMessageFast(_PREHASH_ChatFromViewer); 3966 if(obj_sel){
3965 msg->nextBlockFast(_PREHASH_AgentData); 3967 LLMessageSystem* msg = gMessageSystem;
3966 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 3968 msg->newMessageFast(_PREHASH_ChatFromViewer);
3967 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 3969 msg->nextBlockFast(_PREHASH_AgentData);
3968 msg->nextBlockFast(_PREHASH_ChatData); 3970 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
3969 msg->addStringFast(_PREHASH_Message, "start"); 3971 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
3970 msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); 3972 msg->nextBlockFast(_PREHASH_ChatData);
3971 msg->addS32("Channel", 9000); 3973 msg->addStringFast(_PREHASH_Message, "start"+obj_sel->getID().asString());
3972 3974 msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER);
3973 gAgent.sendReliableMessage(); 3975 msg->addS32("Channel", gSavedSettings.getS32("ParticleChatChannel"));
3976
3977 gAgent.sendReliableMessage();
3978 }
3974 3979
3975 LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); 3980 LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
3976 } 3981 }
3977 //LLVector3d a = sBeamLastAt-gAgent.mPointAt->getPointAtPosGlobal(); 3982
3978 //if(a.length > 2)
3979 if( (sBeamLastAt-gAgent.mPointAt->getPointAtPosGlobal()).length() > .2) 3983 if( (sBeamLastAt-gAgent.mPointAt->getPointAtPosGlobal()).length() > .2)
3980 //if(sBeamLastAt!=gAgent.mPointAt->getPointAtPosGlobal())
3981 { 3984 {
3982 sBeamLastAt = gAgent.mPointAt->getPointAtPosGlobal(); 3985 sBeamLastAt = gAgent.mPointAt->getPointAtPosGlobal();
3983
3984 LLMessageSystem* msg = gMessageSystem;
3985 msg->newMessageFast(_PREHASH_ChatFromViewer);
3986 msg->nextBlockFast(_PREHASH_AgentData);
3987 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
3988 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
3989 msg->nextBlockFast(_PREHASH_ChatData);
3990 msg->addStringFast(_PREHASH_Message, llformat("<%.6f, %.6f, %.6f>",(F32)(sBeamLastAt.mdV[VX]),(F32)(sBeamLastAt.mdV[VY]),(F32)(sBeamLastAt.mdV[VZ])));
3991 msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER);
3992 msg->addS32("Channel", 9000); // *TODO: make configurable
3993 3986
3994 gAgent.sendReliableMessage(); 3987 if(obj_sel){
3988 LLMessageSystem* msg = gMessageSystem;
3989 msg->newMessageFast(_PREHASH_ChatFromViewer);
3990 msg->nextBlockFast(_PREHASH_AgentData);
3991 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
3992 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
3993 msg->nextBlockFast(_PREHASH_ChatData);
3994 msg->addStringFast(_PREHASH_Message, "start"+obj_sel->getID().asString());
3995 msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER);
3996 msg->addS32("Channel", gSavedSettings.getS32("ParticleChatChannel"));
3997
3998 gAgent.sendReliableMessage();
3999 }
3995 } 4000 }
3996 4001
3997 } 4002 }
3998 4003
3999 mBeam->triggerLocal(); 4004 mBeam->triggerLocal();
4000 } 4005 }
4001 else if (selection->getFirstRootObject() && 4006 else if (selection->getFirstRootObject() &&
@@ -4034,6 +4039,8 @@ void LLVOAvatar::idleUpdateTractorBeam()
4034 } 4039 }
4035 } 4040 }
4036} 4041}
4042//</edit>
4043
4037 4044
4038void LLVOAvatar::idleUpdateBelowWater() 4045void LLVOAvatar::idleUpdateBelowWater()
4039{ 4046{