- Duke: add back a limit to the teleporter sound.

Due to broken game logic it is possible for this to play in very large quantities.
This commit is contained in:
Christoph Oelckers 2022-01-15 11:56:38 +01:00
parent c5b382907d
commit 26d89e932a

View file

@ -233,7 +233,7 @@ int S_DefineSound(unsigned index, const char *filename, int minpitch, int maxpit
sndinf[kVolAdjust] = clamp<int>(distance, INT16_MIN, INT16_MAX);
sndinf[kWorldTourMapping] = 0;
sfx->Volume = volume;
sfx->NearLimit = 0;
sfx->NearLimit = index == TELEPORTER + 1? 6 : 0; // the teleporter sound cannot be unlimited due to how it gets used.
sfx->bTentative = false;
sfx->name = std::move(fn);
return 0;