summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2014-08-15 18:49:54 -0700
committerAura Linden <aura@lindenlab.com>2014-08-15 18:49:54 -0700
commit370aa671c66cfd5e2a338602d2e9765e9ea103f8 (patch)
tree50107cbacb8466e5fe96ffbfd369075f850c0cc7 /indra
parent75406641836fee796428216df82b7e29ad24443a (diff)
Allegedly hides voice position on teleport. Needs testing.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llagent.cpp8
-rwxr-xr-xindra/newview/llappviewer.cpp4
-rwxr-xr-xindra/newview/llvoiceclient.cpp7
-rwxr-xr-xindra/newview/llvoiceclient.h3
-rwxr-xr-xindra/newview/llvoicevivox.cpp27
-rwxr-xr-xindra/newview/llvoicevivox.h2
6 files changed, 46 insertions, 5 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index bd6025feea..059f21e91e 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3802,6 +3802,10 @@ void LLAgent::restartFailedTeleportRequest()
void LLAgent::clearTeleportRequest()
{
+ if(LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->setHidden(FALSE);
+ }
mTeleportRequest.reset();
}
@@ -3820,6 +3824,10 @@ bool LLAgent::hasPendingTeleportRequest()
void LLAgent::startTeleportRequest()
{
+ if(LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->setHidden(TRUE);
+ }
if (hasPendingTeleportRequest())
{
if (!isMaturityPreferenceSyncedWithServer())
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 29b883aef1..9cc21ad22e 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4897,8 +4897,8 @@ void LLAppViewer::idle()
// hover callbacks
//
-#ifdef LL_DARWIN SPATTERS may want to make this mac-only. Test on Windows.
- if (mQuitRequested) //MAINT-4243
+#ifdef LL_DARWIN //SPATTERS may want to make this mac-only. Test on Windows.
+ if (!mQuitRequested) //MAINT-4243
#endif
{
// LL_RECORD_BLOCK_TIME(FTM_IDLE_CB);
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 815965fb0a..2d195be0eb 100755
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -160,6 +160,13 @@ void LLVoiceClient::userAuthorized(const std::string& user_id, const LLUUID &age
mVoiceModule->userAuthorized(user_id, agentID);
}
+void LLVoiceClient::setHidden(bool hidden)
+{
+ if (mVoiceModule)
+ {
+ mVoiceModule->setHidden(hidden);
+ }
+}
void LLVoiceClient::terminate()
{
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 1e20a814a0..fb387301be 100755
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -105,6 +105,8 @@ public:
virtual void updateSettings()=0; // call after loading settings and whenever they change
virtual bool isVoiceWorking() const = 0; // connected to a voice server and voice channel
+
+ virtual void setHidden(bool hidden)=0; // Hides the user from voice.
virtual const LLVoiceVersionInfo& getVersion()=0;
@@ -342,6 +344,7 @@ public:
void setCaptureDevice(const std::string& name);
void setRenderDevice(const std::string& name);
+ void setHidden(bool hidden);
const LLVoiceDeviceList& getCaptureDevices();
const LLVoiceDeviceList& getRenderDevices();
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 48d458b142..1eb0ac6ae0 100755
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -70,6 +70,7 @@
#include "apr_base64.h"
#define USE_SESSION_GROUPS 0
+#define VX_NULL_POSITION -2147483648.0 /*The Silence*/
extern LLMenuBarGL* gMenuBarView;
extern void handle_voice_morphing_subscribe();
@@ -2334,7 +2335,9 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe
void LLVivoxVoiceClient::setHidden(bool hidden)
{
+ //SPATTERS hide me
mHidden = hidden;
+ sendPositionalUpdate();
return;
}
@@ -2359,7 +2362,17 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
l = mAvatarRot.getLeftRow();
u = mAvatarRot.getUpRow();
a = mAvatarRot.getFwdRow();
- pos = mAvatarPosition;
+ if (mHidden)
+ {
+ for (int i=0;i<3;++i)
+ {
+ pos.mdV[i] = VX_NULL_POSITION;
+ }
+ }
+ else
+ {
+ pos = mAvatarPosition;
+ }
vel = mAvatarVelocity;
// SLIM SDK: the old SDK was doing a transform on the passed coordinates that the new one doesn't do anymore.
@@ -2426,7 +2439,17 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
l = earRot.getLeftRow();
u = earRot.getUpRow();
a = earRot.getFwdRow();
- pos = earPosition;
+ if (mHidden)
+ {
+ for (int i=0;i<3;++i)
+ {
+ pos.mdV[i] = VX_NULL_POSITION;
+ }
+ }
+ else
+ {
+ pos = earPosition;
+ }
vel = earVelocity;
// LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL;
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 8829d9e1b4..10ebac730d 100755
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -747,7 +747,7 @@ private:
std::string getAudioSessionURI();
std::string getAudioSessionHandle();
- void setHidden(bool hidden);
+ void setHidden(bool hidden); //virtual
void sendPositionalUpdate(void);
void buildSetCaptureDevice(std::ostringstream &stream);