From d6e810443eaacaa4fa52b53eb09579ee36464c6b Mon Sep 17 00:00:00 2001 From: Hazim Gazov Date: Tue, 4 May 2010 22:58:13 -0300 Subject: [PATCH] polished the voice anchor a little more --- indra/newview/llvoiceclient.cpp | 2 +- indra/newview/llvoiceclient.h | 8 ++++---- indra/newview/llvoiceremotectrl.cpp | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index e3840468b..81ce1f4e8 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -3616,7 +3616,7 @@ void LLVoiceClient::sendFriendsListUpdates() << "" << "" << mAccountHandle << "" << "" << buddy->mURI << "" - << "" << buddy->mDisplayName << "" + << "" << buddy->mDisplayName << "" << "" // Without this, SLVoice doesn't seem to parse the command. << "0" << "\n\n\n"; diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index c53ba36a8..acb9fff99 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -175,6 +175,10 @@ static void updatePosition(void); void setAvatarPosition(const LLVector3d &position, const LLVector3 &velocity, const LLMatrix3 &rot); bool channelFromRegion(LLViewerRegion *region, std::string &name); void leaveChannel(void); // call this on logout or teleport begin + + // This should be called when the code detects we have changed parcels. + // It initiates the call to the server that gets the parcel channel. + void parcelChanged(); void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. @@ -648,10 +652,6 @@ static void updatePosition(void); bool mCaptureDeviceDirty; bool mRenderDeviceDirty; - // This should be called when the code detects we have changed parcels. - // It initiates the call to the server that gets the parcel channel. - void parcelChanged(); - void switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = ""); void joinSession(sessionState *session); diff --git a/indra/newview/llvoiceremotectrl.cpp b/indra/newview/llvoiceremotectrl.cpp index ca211625e..341601d6d 100644 --- a/indra/newview/llvoiceremotectrl.cpp +++ b/indra/newview/llvoiceremotectrl.cpp @@ -252,6 +252,11 @@ void LLVoiceRemoteCtrl::onClickPosLock(void* user_data) { gVoiceClient->setPosLocked(!gVoiceClient->getPosLocked()); llwarns << gVoiceClient->getPosLocked() << llendl; + + if(!gVoiceClient->getPosLocked()) + { + gVoiceClient->parcelChanged(); //force it to get a new SIP url based on our actual location + } } void LLVoiceRemoteCtrl::onClickSpeakers(void *user_data)