r130 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Sep 29 18:53:31 EDT 2005
Author: tma
Date: 2005-09-29 18:53:31 -0400 (Thu, 29 Sep 2005)
New Revision: 130
Modified:
trunk/code/client/snd_dma.c
trunk/code/client/snd_local.h
Log:
* A better fix to the "doppler" bug
Modified: trunk/code/client/snd_dma.c
===================================================================
--- trunk/code/client/snd_dma.c 2005-09-29 22:35:05 UTC (rev 129)
+++ trunk/code/client/snd_dma.c 2005-09-29 22:53:31 UTC (rev 130)
@@ -780,10 +780,9 @@
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>MAX_DOPPLER_SCALE) {
+ loopSounds[entityNum].dopplerScale = MAX_DOPPLER_SCALE;
}
- else if (loopSounds[entityNum].dopplerScale>(float)SND_CHUNK_SIZE) {
- loopSounds[entityNum].dopplerScale = (float)SND_CHUNK_SIZE;
- }
}
loopSounds[entityNum].framenum = cls.framecount;
Modified: trunk/code/client/snd_local.h
===================================================================
--- trunk/code/client/snd_local.h 2005-09-29 22:35:05 UTC (rev 129)
+++ trunk/code/client/snd_local.h 2005-09-29 22:53:31 UTC (rev 130)
@@ -72,6 +72,8 @@
#define START_SAMPLE_IMMEDIATE 0x7fffffff
+#define MAX_DOPPLER_SCALE 50.0f //arbitrary
+
typedef struct loopSound_s {
vec3_t origin;
vec3_t velocity;
More information about the quake3-commits
mailing list