forked from mirror/openmw-tes3mp
Replace 0 sound range values separately
This commit is contained in:
parent
1c13256456
commit
16af1a6c1c
1 changed files with 4 additions and 8 deletions
|
@ -142,16 +142,12 @@ namespace MWSound
|
|||
float volume, min, max;
|
||||
|
||||
volume = static_cast<float>(pow(10.0, (sound->mData.mVolume / 255.0*3348.0 - 3348.0) / 2000.0));
|
||||
if(sound->mData.mMinRange == 0 && sound->mData.mMaxRange == 0)
|
||||
{
|
||||
min = sound->mData.mMinRange;
|
||||
max = sound->mData.mMaxRange;
|
||||
if (min == 0)
|
||||
min = fAudioDefaultMinDistance;
|
||||
if (max == 0)
|
||||
max = fAudioDefaultMaxDistance;
|
||||
}
|
||||
else
|
||||
{
|
||||
min = sound->mData.mMinRange;
|
||||
max = sound->mData.mMaxRange;
|
||||
}
|
||||
|
||||
min *= fAudioMinDistanceMult;
|
||||
max *= fAudioMaxDistanceMult;
|
||||
|
|
Loading…
Reference in a new issue