mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
* A better fix to the "doppler" bug
This commit is contained in:
parent
24d3c6b2a2
commit
52dcaa45fd
2 changed files with 4 additions and 3 deletions
|
@ -780,9 +780,8 @@ void S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocit
|
||||||
loopSounds[entityNum].dopplerScale = lenb/(lena*100);
|
loopSounds[entityNum].dopplerScale = lenb/(lena*100);
|
||||||
if (loopSounds[entityNum].dopplerScale<=1.0) {
|
if (loopSounds[entityNum].dopplerScale<=1.0) {
|
||||||
loopSounds[entityNum].doppler = qfalse; // don't bother doing the math
|
loopSounds[entityNum].doppler = qfalse; // don't bother doing the math
|
||||||
}
|
} else if (loopSounds[entityNum].dopplerScale>MAX_DOPPLER_SCALE) {
|
||||||
else if (loopSounds[entityNum].dopplerScale>(float)SND_CHUNK_SIZE) {
|
loopSounds[entityNum].dopplerScale = MAX_DOPPLER_SCALE;
|
||||||
loopSounds[entityNum].dopplerScale = (float)SND_CHUNK_SIZE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,8 @@ typedef struct {
|
||||||
|
|
||||||
#define START_SAMPLE_IMMEDIATE 0x7fffffff
|
#define START_SAMPLE_IMMEDIATE 0x7fffffff
|
||||||
|
|
||||||
|
#define MAX_DOPPLER_SCALE 50.0f //arbitrary
|
||||||
|
|
||||||
typedef struct loopSound_s {
|
typedef struct loopSound_s {
|
||||||
vec3_t origin;
|
vec3_t origin;
|
||||||
vec3_t velocity;
|
vec3_t velocity;
|
||||||
|
|
Loading…
Reference in a new issue