From e6cb2e4a8d4895590931824fb4bfb6161590336d Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 29 Aug 2019 19:00:42 +0000 Subject: [PATCH] Use a sound's volume offset parameter as the max distance if the explosion flag is set git-svn-id: https://svn.eduke32.com/eduke32@8058 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/sounds.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/sounds.cpp b/source/duke3d/src/sounds.cpp index 02d9b5bc2..4bd946e9c 100644 --- a/source/duke3d/src/sounds.cpp +++ b/source/duke3d/src/sounds.cpp @@ -610,9 +610,12 @@ sound_further_processing: #ifndef EDUKE32_STANDALONE boost: #endif + int const sdist = g_sounds[soundNum].vo > 0 ? g_sounds[soundNum].vo : 6144; + explosion = true; - if (sndist > 6144) - sndist = 6144; + + if (sndist > sdist) + sndist = sdist; } #ifndef EDUKE32_STANDALONE