Fix cone angle calculation (#605)

master
Devin Braune 2021-10-14 20:18:54 +02:00 committed by GitHub
parent 6a3c4c09f8
commit 0e9ce1aa83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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))