diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llagent.cpp | 8 | ||||
-rwxr-xr-x | indra/newview/llappviewer.cpp | 4 | ||||
-rwxr-xr-x | indra/newview/llvoiceclient.cpp | 7 | ||||
-rwxr-xr-x | indra/newview/llvoiceclient.h | 3 | ||||
-rwxr-xr-x | indra/newview/llvoicevivox.cpp | 27 | ||||
-rwxr-xr-x | indra/newview/llvoicevivox.h | 2 |
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 bf1a0a4173..56f306138b 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4897,8 +4897,8 @@ void LLAppViewer::idle() // hover callbacks // -#ifdef LL_DARWIN - if (mQuitRequested) //MAINT-4243 +#ifdef LL_DARWIN + 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 2bee176b8d..4f89972192 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(); @@ -2333,7 +2334,9 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe void LLVivoxVoiceClient::setHidden(bool hidden) { + //SPATTERS hide me mHidden = hidden; + sendPositionalUpdate(); return; } @@ -2358,7 +2361,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. @@ -2425,7 +2438,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); |