From b8dc7494eb01cb4b2762e20910e8617b7c986cee Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 16 Aug 2022 00:03:19 +0300 Subject: [PATCH] engine: client: move timescale pitch apply to channel mixing --- engine/client/s_main.c | 2 -- engine/client/s_mix.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/client/s_main.c b/engine/client/s_main.c index 6c926552..332c2beb 100644 --- a/engine/client/s_main.c +++ b/engine/client/s_main.c @@ -533,8 +533,6 @@ void S_StartSound( const vec3_t pos, int ent, int chan, sound_t handle, float fv // spatialize memset( target_chan, 0, sizeof( *target_chan )); - pitch *= (sys_timescale.value + 1) / 2; - VectorCopy( pos, target_chan->origin ); target_chan->staticsound = ( ent == 0 ) ? true : false; target_chan->use_loop = (flags & SND_STOP_LOOPING) ? false : true; diff --git a/engine/client/s_mix.c b/engine/client/s_mix.c index 8cceac98..bcc8304c 100644 --- a/engine/client/s_mix.c +++ b/engine/client/s_mix.c @@ -619,6 +619,8 @@ void MIX_MixChannelsToPaintbuffer( int endtime, int rate, int outputRate ) ch->pitch = VOX_ModifyPitch( ch, ch->basePitch * 0.01f ); else ch->pitch = ch->basePitch * 0.01f; + ch->pitch *= ( sys_timescale.value + 1 ) / 2; + if( CL_GetEntityByIndex( ch->entnum ) && ( ch->entchannel == CHAN_VOICE )) { if( pSource->width == 1 )