Renamed DisableWindAudio to MuteWind and made it actually work

This will give Windows(only?) users experiencing the problem with wind sound corruption a way out.
This commit is contained in:
Lirusaito
2012-07-10 00:52:02 -04:00
parent 23e6c9c9e8
commit 176c91097a
2 changed files with 8 additions and 3 deletions

View File

@@ -8514,7 +8514,7 @@
<integer>29</integer>
</array>
</map>
<key>DisableWindAudio</key>
<key>MuteWind</key>
<map>
<key>Comment</key>
<string>Disable the wind audio effect</string>

View File

@@ -271,9 +271,14 @@ void audio_update_wind(bool force_update)
// which is sufficient to completely turn off or turn on wind noise
volume_delta = 1.f;
}
// mute wind entirely when the user asked
if (gSavedSettings.getBOOL("MuteWind"))
{
// volume decreases by itself
gAudiop->mMaxWindGain -= gAudiop->mMaxWindGain;
}
// mute wind when not /*flying*/ in air
if /*(gAgent.getFlying())*/ (gAgentAvatarp && gAgentAvatarp->mInAir)
else if /*(gAgent.getFlying())*/ (gAgentAvatarp && gAgentAvatarp->mInAir)
{
// volume increases by volume_delta, up to no more than max_wind_volume
gAudiop->mMaxWindGain = llmin(gAudiop->mMaxWindGain + volume_delta, max_wind_volume);