From 02c9899ed3965c3a204edfc7056437b4a5e3665d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 11 Jan 2019 12:10:59 +0100 Subject: [PATCH] - the sound compatibility flags do not need level support. They are intentionally omitted from both MAPINFO and compatibility settings. This removes the last place where it still went through the map-modified versions of the compatflags. --- src/s_sound.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 7e0c23a724e..6e290f49c8b 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -990,22 +990,19 @@ static FSoundChan *S_StartSound(FLevelLocals *Level, AActor *actor, const sector { return nullptr; } - - if (Level != nullptr) + + if (compatflags & COMPATF_MAGICSILENCE) + { // For people who just can't play without a silent BFG. + channel = CHAN_WEAPON; + } + else if ((chanflags & CHAN_MAYBE_LOCAL) && (compatflags & COMPATF_SILENTPICKUP)) { - if (Level->i_compatflags & COMPATF_MAGICSILENCE) - { // For people who just can't play without a silent BFG. - channel = CHAN_WEAPON; - } - else if ((chanflags & CHAN_MAYBE_LOCAL) && (Level->i_compatflags & COMPATF_SILENTPICKUP)) + if (actor != nullptr && actor != players[consoleplayer].camera) { - if (actor != nullptr && actor != players[consoleplayer].camera) - { - return nullptr; - } + return nullptr; } } - + sfx = &S_sfx[sound_id]; // Scale volume according to SNDINFO data.