* Fixed the bug where the "doppler" effect code could cause a temporary client lock up

This commit is contained in:
Tim Angus 2005-09-29 22:35:05 +00:00
parent de1840a23a
commit 24d3c6b2a2

View file

@ -781,6 +781,9 @@ void S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocit
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;
}
}
loopSounds[entityNum].framenum = cls.framecount;