Update the participant's region when crossing region boundaries.

meow-7.2.2
Roxie Linden 2024-05-02 13:15:44 -07:00
parent e02c92cb6a
commit 05b2dd913f
1 changed files with 8 additions and 0 deletions

View File

@ -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();
}
}
}