summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-07-27 19:30:55 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-07-27 19:30:55 +0300
commit8771130ef72af23a163eb3dc08782bec979f0251 (patch)
treed4180e4f7fde8316e94fd864124a115598d3f595 /indra/newview/llviewermedia.cpp
parent4c3f343799ca4be4b618dca8cf13a86e8941fb44 (diff)
SL-17809 Sounds from Avatar position instead of Camera position
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 812f804ea9..03c9926e1d 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();
}
}