summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorNat Linden <nat@lindenlab.com>2022-09-19 21:21:21 +0000
committerNat Linden <nat@lindenlab.com>2022-09-19 21:21:21 +0000
commit9ac0b3da77ca0c54161803f23cc37c09e871799d (patch)
treeec9575c248d6e9cd01d8d15471ceb952c7dba738 /indra/newview/llviewermedia.cpp
parent5f1c8d311904bd3937f5ba70476e16233f7d21c1 (diff)
parentf39be1dfd30032f10f21cccc29e93c1c49f01df5 (diff)
SL-18068: Merged DRTVWR-565-maint-P into sl-18068
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 636909e6f2..84013c488f 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3581,7 +3581,20 @@ void LLViewerMediaImpl::calculateInterest()
LLVector3d global_delta = agent_global - obj_global ;
mProximityDistance = global_delta.magVecSquared(); // use distance-squared because it's cheaper and sorts the same.
- LLVector3d camera_delta = gAgentCamera.getCameraPositionGlobal() - obj_global;
+ static LLUICachedControl<S32> mEarLocation("MediaSoundsEarLocation", 0);
+ LLVector3d ear_position;
+ switch(mEarLocation)
+ {
+ case 0:
+ default:
+ ear_position = gAgentCamera.getCameraPositionGlobal();
+ break;
+
+ case 1:
+ ear_position = agent_global;
+ break;
+ }
+ LLVector3d camera_delta = ear_position - obj_global;
mProximityCamera = camera_delta.magVec();
}
}