aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-07-17 20:02:54 -0700
committerChris Robinson <[email protected]>2022-07-17 20:02:54 -0700
commit0650d4ee70cdb74dc8829566dfc3e8b12e1ba008 (patch)
tree491c7617f9ff92b4ef8ca2365082bd556e1cb452
parent0d2eeda9c1beef88c107fb4bf4e19f95ceb6411f (diff)
Remove a redundant check
If src_occlusion_mb is 0, it'll be multiplied with whatever the ratio ends up being, which will result in 0 anyway. A number of uses also already check the occlusion value before calling the method.
-rw-r--r--al/source.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/al/source.cpp b/al/source.cpp
index 842dbd67..a8c25bb6 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -3996,9 +3996,6 @@ float ALsource::eax_calculate_dst_occlusion_mb(
float path_ratio,
float lf_ratio) noexcept
{
- if(src_occlusion_mb == 0)
- return 0.0f;
-
const auto ratio_1 = path_ratio + lf_ratio - 1.0F;
const auto ratio_2 = path_ratio * lf_ratio;
const auto ratio = (ratio_2 > ratio_1) ? ratio_2 : ratio_1;