Skip to content

Commit

Permalink
- the sound compatibility flags do not need level support.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
coelckers committed Jan 11, 2019
1 parent e68b3f6 commit 02c9899
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/s_sound.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit 02c9899

Please sign in to comment.