mirror of
https://github.com/ENSL/NS.git
synced 2025-02-08 16:52:21 +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);
|
theVolume = this->mVolume - this->mVolume*(theDistance/(float)this->mFadeDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CVAR_GET_FLOAT("cl_ambientsound") != 1.0f)
|
float ambientscale = (CVAR_GET_FLOAT("cl_ambientsound"));
|
||||||
{
|
ambientscale = min(max(0, ambientscale), 1);
|
||||||
theVolume = 0;
|
theVolume = min(max(0, theVolume), 255);
|
||||||
}
|
theVolume *= ambientscale;
|
||||||
else
|
|
||||||
{
|
|
||||||
theVolume = min(max(0, theVolume), 255);
|
|
||||||
}
|
|
||||||
|
|
||||||
FMOD_INSTANCE* theFMOD = gHUD.GetFMOD();
|
FMOD_INSTANCE* theFMOD = gHUD.GetFMOD();
|
||||||
|
|
||||||
if (theFMOD)
|
if (theFMOD)
|
||||||
|
|
Loading…
Reference in a new issue