summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/lltextbase.cpp2
-rw-r--r--indra/newview/llvoicewebrtc.cpp32
2 files changed, 17 insertions, 17 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index c1b01f420b..778b253c3c 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -483,7 +483,7 @@ std::vector<std::pair<LLRect, LLUIColor>> LLTextBase::getHighlightedBgRects()
F32 left_precise = (F32)line_iter->mRect.mLeft;
F32 right_precise = (F32)line_iter->mRect.mLeft;
- for (; segment_iter != mSegments.end(); ++segment_iter)
+ for (; segment_iter != mSegments.end(); ++segment_iter, segment_offset = 0)
{
LLTextSegmentPtr segmentp = *segment_iter;
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 08fcec86ac..9835a69e4e 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -985,7 +985,10 @@ void LLWebRTCVoiceClient::updatePosition(void)
LLWebRTCVoiceClient::participantStatePtr_t participant = findParticipantByID("Estate", gAgentID);
if(participant)
{
- participant->mRegion = gAgent.getRegion()->getRegionID();
+ if (participant->mRegion != region->getRegionID()) {
+ participant->mRegion = region->getRegionID();
+ setMuteMic(mMuteMic);
+ }
}
}
}
@@ -3104,23 +3107,20 @@ LLVoiceWebRTCSpatialConnection::~LLVoiceWebRTCSpatialConnection()
void LLVoiceWebRTCSpatialConnection::setMuteMic(bool muted)
{
- if (mMuted != muted)
+ mMuted = muted;
+ if (mWebRTCAudioInterface)
{
- mMuted = muted;
- if (mWebRTCAudioInterface)
+ LLViewerRegion *regionp = gAgent.getRegion();
+ if (regionp && mRegionID == regionp->getRegionID())
{
- LLViewerRegion *regionp = gAgent.getRegion();
- if (regionp && mRegionID == regionp->getRegionID())
- {
- mWebRTCAudioInterface->setMute(muted);
- }
- else
- {
- // Always mute this agent with respect to neighboring regions.
- // Peers don't want to hear this agent from multiple regions
- // as that'll echo.
- mWebRTCAudioInterface->setMute(true);
- }
+ mWebRTCAudioInterface->setMute(muted);
+ }
+ else
+ {
+ // Always mute this agent with respect to neighboring regions.
+ // Peers don't want to hear this agent from multiple regions
+ // as that'll echo.
+ mWebRTCAudioInterface->setMute(true);
}
}
}