diff options
Diffstat (limited to 'linden/indra/newview/llvoavatar.cpp')
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 24272d8..431ef96 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -295,6 +295,9 @@ F32 LLVOAvatar::sUnbakedTime = 0.f; | |||
295 | F32 LLVOAvatar::sUnbakedUpdateTime = 0.f; | 295 | F32 LLVOAvatar::sUnbakedUpdateTime = 0.f; |
296 | F32 LLVOAvatar::sGreyTime = 0.f; | 296 | F32 LLVOAvatar::sGreyTime = 0.f; |
297 | F32 LLVOAvatar::sGreyUpdateTime = 0.f; | 297 | F32 LLVOAvatar::sGreyUpdateTime = 0.f; |
298 | LLVector3d LLVOAvatar::sBeamLastAt; | ||
299 | int LLVOAvatar::sPartsNow; | ||
300 | |||
298 | 301 | ||
299 | struct LLAvatarTexData | 302 | struct LLAvatarTexData |
300 | { | 303 | { |
@@ -3445,6 +3448,26 @@ void LLVOAvatar::idleUpdateTractorBeam() | |||
3445 | if (!needsRenderBeam() || !mIsBuilt) | 3448 | if (!needsRenderBeam() || !mIsBuilt) |
3446 | { | 3449 | { |
3447 | mBeam = NULL; | 3450 | mBeam = NULL; |
3451 | if(gSavedSettings.getBOOL("ParticleChat")) | ||
3452 | { | ||
3453 | if(sPartsNow != FALSE) | ||
3454 | { | ||
3455 | sPartsNow = FALSE; | ||
3456 | LLMessageSystem* msg = gMessageSystem; | ||
3457 | msg->newMessageFast(_PREHASH_ChatFromViewer); | ||
3458 | msg->nextBlockFast(_PREHASH_AgentData); | ||
3459 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
3460 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
3461 | msg->nextBlockFast(_PREHASH_ChatData); | ||
3462 | msg->addStringFast(_PREHASH_Message, "stop"); | ||
3463 | msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); | ||
3464 | msg->addS32("Channel", 9000); | ||
3465 | |||
3466 | gAgent.sendReliableMessage(); | ||
3467 | sBeamLastAt = LLVector3d::zero; | ||
3468 | LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); | ||
3469 | } | ||
3470 | } | ||
3448 | } | 3471 | } |
3449 | else if (!mBeam || mBeam->isDead()) | 3472 | else if (!mBeam || mBeam->isDead()) |
3450 | { | 3473 | { |
@@ -3463,6 +3486,48 @@ void LLVOAvatar::idleUpdateTractorBeam() | |||
3463 | { | 3486 | { |
3464 | // get point from pointat effect | 3487 | // get point from pointat effect |
3465 | mBeam->setPositionGlobal(gAgent.mPointAt->getPointAtPosGlobal()); | 3488 | mBeam->setPositionGlobal(gAgent.mPointAt->getPointAtPosGlobal()); |
3489 | |||
3490 | if(gSavedSettings.getBOOL("ParticleChat")) | ||
3491 | { | ||
3492 | if(sPartsNow != TRUE) | ||
3493 | { | ||
3494 | sPartsNow = TRUE; | ||
3495 | LLMessageSystem* msg = gMessageSystem; | ||
3496 | msg->newMessageFast(_PREHASH_ChatFromViewer); | ||
3497 | msg->nextBlockFast(_PREHASH_AgentData); | ||
3498 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
3499 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
3500 | msg->nextBlockFast(_PREHASH_ChatData); | ||
3501 | msg->addStringFast(_PREHASH_Message, "start"); | ||
3502 | msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); | ||
3503 | msg->addS32("Channel", 9000); | ||
3504 | |||
3505 | gAgent.sendReliableMessage(); | ||
3506 | |||
3507 | LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT); | ||
3508 | } | ||
3509 | //LLVector3d a = sBeamLastAt-gAgent.mPointAt->getPointAtPosGlobal(); | ||
3510 | //if(a.length > 2) | ||
3511 | if( (sBeamLastAt-gAgent.mPointAt->getPointAtPosGlobal()).length() > .2) | ||
3512 | //if(sBeamLastAt!=gAgent.mPointAt->getPointAtPosGlobal()) | ||
3513 | { | ||
3514 | sBeamLastAt = gAgent.mPointAt->getPointAtPosGlobal(); | ||
3515 | |||
3516 | LLMessageSystem* msg = gMessageSystem; | ||
3517 | msg->newMessageFast(_PREHASH_ChatFromViewer); | ||
3518 | msg->nextBlockFast(_PREHASH_AgentData); | ||
3519 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
3520 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
3521 | msg->nextBlockFast(_PREHASH_ChatData); | ||
3522 | msg->addStringFast(_PREHASH_Message, llformat("<%.6f, %.6f, %.6f>",(F32)(sBeamLastAt.mdV[VX]),(F32)(sBeamLastAt.mdV[VY]),(F32)(sBeamLastAt.mdV[VZ]))); | ||
3523 | msg->addU8Fast(_PREHASH_Type, CHAT_TYPE_WHISPER); | ||
3524 | msg->addS32("Channel", 9000); // *TODO: make configurable | ||
3525 | |||
3526 | gAgent.sendReliableMessage(); | ||
3527 | } | ||
3528 | |||
3529 | } | ||
3530 | |||
3466 | mBeam->triggerLocal(); | 3531 | mBeam->triggerLocal(); |
3467 | } | 3532 | } |
3468 | else if (selection->getFirstRootObject() && | 3533 | else if (selection->getFirstRootObject() && |