aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alu.cpp
diff options
context:
space:
mode:
authorDevin Braune <[email protected]>2021-10-14 20:18:54 +0200
committerGitHub <[email protected]>2021-10-14 11:18:54 -0700
commit0e9ce1aa83b99058a4c1b75035f1a0102ff691ef (patch)
treef7d204147c89dacbaf4ade3195dd415695363259 /alc/alu.cpp
parent6a3c4c09f838b0e9156b3f4c223281a3ed43817b (diff)
Fix cone angle calculation (#605)
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r--alc/alu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp
index e28d2a53..b317a40f 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -1386,7 +1386,7 @@ void CalcAttnSourceParams(Voice *voice, const VoiceProps *props, const ContextBa
/* Calculate directional soundcones */
if(directional && props->InnerAngle < 360.0f)
{
- const float Angle{Rad2Deg(std::acos(Direction.dot_product(ToSource)) * ConeScale * -2.0f)};
+ const float Angle{Rad2Deg(std::acos(-Direction.dot_product(ToSource)) * ConeScale * 2.0f)};
float ConeGain, ConeHF;
if(!(Angle > props->InnerAngle))