aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--code/client/snd_dma.c5
-rw-r--r--code/client/snd_local.h2
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;