From d2ee75cfa9e34acdd1b3ae253549193eea83e401 Mon Sep 17 00:00:00 2001 From: tma Date: Thu, 29 Sep 2005 22:53:31 +0000 Subject: * A better fix to the "doppler" bug git-svn-id: svn://svn.icculus.org/quake3/trunk@130 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/snd_dma.c | 5 ++--- code/client/snd_local.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'code/client') diff --git a/code/client/snd_dma.c b/code/client/snd_dma.c index 2a99aae..74af447 100644 --- a/code/client/snd_dma.c +++ b/code/client/snd_dma.c @@ -780,9 +780,8 @@ void S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocit loopSounds[entityNum].dopplerScale = lenb/(lena*100); if (loopSounds[entityNum].dopplerScale<=1.0) { loopSounds[entityNum].doppler = qfalse; // don't bother doing the math - } - else if (loopSounds[entityNum].dopplerScale>(float)SND_CHUNK_SIZE) { - loopSounds[entityNum].dopplerScale = (float)SND_CHUNK_SIZE; + } else if (loopSounds[entityNum].dopplerScale>MAX_DOPPLER_SCALE) { + loopSounds[entityNum].dopplerScale = MAX_DOPPLER_SCALE; } } diff --git a/code/client/snd_local.h b/code/client/snd_local.h index da2d5db..6131ad3 100644 --- a/code/client/snd_local.h +++ b/code/client/snd_local.h @@ -72,6 +72,8 @@ typedef struct { #define START_SAMPLE_IMMEDIATE 0x7fffffff +#define MAX_DOPPLER_SCALE 50.0f //arbitrary + typedef struct loopSound_s { vec3_t origin; vec3_t velocity; -- cgit v1.2.3