Revert "engine: client: sounds with zero attenuation must get spatialized anyway"

This reverts commit 0870536405.
This commit is contained in:
Alibek Omarov 2024-09-05 13:27:54 +03:00
parent 950d210ec5
commit 96d11df06c

View file

@ -524,6 +524,9 @@ static void SND_Spatialize( channel_t *ch )
dist = VectorNormalizeLength( source_vec ); dist = VectorNormalizeLength( source_vec );
dot = DotProduct( s_listener.right, source_vec ); dot = DotProduct( s_listener.right, source_vec );
// don't pan sounds with no attenuation
if( ch->dist_mult <= 0.0f ) dot = 0.0f;
// fill out channel volumes for single location // fill out channel volumes for single location
S_SpatializeChannel( &ch->leftvol, &ch->rightvol, ch->master_vol, gain, dot, dist * ch->dist_mult ); S_SpatializeChannel( &ch->leftvol, &ch->rightvol, ch->master_vol, gain, dot, dist * ch->dist_mult );