diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-09-29 22:53:31 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-09-29 22:53:31 +0000 |
commit | d2ee75cfa9e34acdd1b3ae253549193eea83e401 (patch) | |
tree | 53ccc249262e86b5f559f395b9b0dabb531ba9e8 /code/client | |
parent | e0252b4e14dc00370704d273a575e7d05e280800 (diff) | |
download | ioquake3-aero-d2ee75cfa9e34acdd1b3ae253549193eea83e401.tar.gz ioquake3-aero-d2ee75cfa9e34acdd1b3ae253549193eea83e401.zip |
* A better fix to the "doppler" bug
git-svn-id: svn://svn.icculus.org/quake3/trunk@130 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/client')
-rw-r--r-- | code/client/snd_dma.c | 5 | ||||
-rw-r--r-- | code/client/snd_local.h | 2 |
2 files changed, 4 insertions, 3 deletions
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; |