mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-31 03:10:33 +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);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue