diff --git a/neo/sound/snd_world.cpp b/neo/sound/snd_world.cpp index 77194085..43dfa7c3 100644 --- a/neo/sound/snd_world.cpp +++ b/neo/sound/snd_world.cpp @@ -1734,8 +1734,7 @@ void idSoundWorldLocal::AddChannelContribution( idSoundEmitterLocal *sound, idSo volume = soundSystemLocal.dB2Scale( parms->volume ); } - // global volume scale - volume *= soundSystemLocal.dB2Scale( idSoundSystemLocal::s_volume.GetFloat() ); + // DG: moved global volume scale down to after clamping to 1.0 // volume fading float fadeDb = chan->channelFade.FadeDbAt44kHz( current44kHz ); @@ -1802,13 +1801,20 @@ void idSoundWorldLocal::AddChannelContribution( idSoundEmitterLocal *sound, idSo // See also https://github.com/dhewm/dhewm3/issues/179 // First clamp it to 1.0 - that's done anyway when setting AL_GAIN below, - // for consistency it must be done before scaling, see - // https://github.com/dhewm/dhewm3/issues/326#issuecomment-1366833004 + // for consistency it must be done before scaling, because many player-weapon + // sounds have a too high volume defined and only sound right (relative to + // other weapons) when clamped + // see https://github.com/dhewm/dhewm3/issues/326#issuecomment-1366833004 if(volume > 1.0f) { volume = 1.0f; } volume *= 0.333f; // (0.333 worked fine, 0.5 didn't) + + // global volume scale - DG: now done after clamping to 1.0, so reducing the + // global volume doesn't cause the different weapon volume issues described above + volume *= soundSystemLocal.dB2Scale( idSoundSystemLocal::s_volume.GetFloat() ); + // // do we have anything to add? //