diff options
author | Armin Weatherwax | 2011-03-10 09:16:09 +0100 |
---|---|---|
committer | Armin Weatherwax | 2011-03-10 09:16:09 +0100 |
commit | d7b2279bbc76bd617074969fe7d4a8b5305a6f5b (patch) | |
tree | c832a8594babd6965430977e69478fda3ad54242 /linden/indra/newview | |
parent | fix llerrs crash "Vertex buffer destroyed while mapped!" in sse2 codepath (diff) | |
download | meta-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')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 13 | ||||
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 63 |
2 files changed, 47 insertions, 29 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index fbb51e8..59c2982 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -872,7 +872,7 @@ | |||
872 | <key>ParticleChat</key> | 872 | <key>ParticleChat</key> |
873 | <map> | 873 | <map> |
874 | <key>Comment</key> | 874 | <key>Comment</key> |
875 | <string>Chat target of effect beam to channel 9000</string> | 875 | <string>Chat target of effect beam to channel given by ParticleChatChannel</string> |
876 | <key>Persist</key> | 876 | <key>Persist</key> |
877 | <integer>1</integer> | 877 | <integer>1</integer> |
878 | <key>Type</key> | 878 | <key>Type</key> |
@@ -880,6 +880,17 @@ | |||
880 | <key>Value</key> | 880 | <key>Value</key> |
881 | <integer>0</integer> | 881 | <integer>0</integer> |
882 | </map> | 882 | </map> |
883 | <key>ParticleChatChannel</key> | ||
884 | <map> | ||
885 | <key>Comment</key> | ||
886 | <string>Channel for the ParticleChat target</string> | ||
887 | <key>Persist</key> | ||
888 | <integer>1</integer> | ||
889 | <key>Type</key> | ||
890 | <string>S32</string> | ||
891 | <key>Value</key> | ||
892 | <integer>118000</integer> | ||
893 | </map> | ||
883 | <key>PersistShowLookAt</key> | 894 | <key>PersistShowLookAt</key> |
884 | <map> | 895 | <map> |
885 | <key>Comment</key> | 896 | <key>Comment</key> |
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 | ||
4038 | void LLVOAvatar::idleUpdateBelowWater() | 4045 | void LLVOAvatar::idleUpdateBelowWater() |
4039 | { | 4046 | { |