summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-05-02 13:15:44 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-05-02 13:15:44 -0700
commit05b2dd913fcb1c5485ce19885e4e60f26752e6b0 (patch)
tree75bf206410bff1c655a15dd80ca05abdab81f581 /indra/newview
parente02c92cb6ae2598c34f2623dbae8b84da6ed2d76 (diff)
Update the participant's region when crossing region boundaries.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoicewebrtc.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 7c438dfa9a..ddbe2eb552 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -553,6 +553,7 @@ void LLWebRTCVoiceClient::updateNeighboringRegions()
// Estate voice requires connection to neighboring regions.
mNeighboringRegions.clear();
+ // add current region.
mNeighboringRegions.insert(gAgent.getRegion()->getRegionID());
// base off of speaker position as it'll move more slowly than camera position.
@@ -924,6 +925,13 @@ void LLWebRTCVoiceClient::updatePosition(void)
enforceTether();
updateNeighboringRegions();
+
+ // update own region id to be the region id avatar is currently in.
+ LLWebRTCVoiceClient::participantStatePtr_t participant = findParticipantByID("Estate", gAgentID);
+ if(participant)
+ {
+ participant->mRegion = gAgent.getRegion()->getRegionID();
+ }
}
}