mirror of
https://github.com/ENSL/NS.git
synced 2025-02-01 21:51:03 +00:00
cl_ambientsound scales volume instead of bool
- Limited 1x scale because people have 2 in their configs from last patch.
This commit is contained in:
parent
95d0c38fdc
commit
50930aaa6e
1 changed files with 5 additions and 9 deletions
|
@ -101,15 +101,11 @@ void AvHAmbientSound::UpdateVolume(const Vector& inListenerPosition)
|
|||
theVolume = this->mVolume - this->mVolume*(theDistance/(float)this->mFadeDistance);
|
||||
}
|
||||
|
||||
if (CVAR_GET_FLOAT("cl_ambientsound") != 1.0f)
|
||||
{
|
||||
theVolume = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
theVolume = min(max(0, theVolume), 255);
|
||||
}
|
||||
|
||||
float ambientscale = (CVAR_GET_FLOAT("cl_ambientsound"));
|
||||
ambientscale = min(max(0, ambientscale), 1);
|
||||
theVolume = min(max(0, theVolume), 255);
|
||||
theVolume *= ambientscale;
|
||||
|
||||
FMOD_INSTANCE* theFMOD = gHUD.GetFMOD();
|
||||
|
||||
if (theFMOD)
|
||||
|
|
Loading…
Reference in a new issue