forked from mirror/openmw-tes3mp
Switch sound distance model to AL_INVERSE_DISTANCE
This commit is contained in:
parent
fbed429b25
commit
cf85cbbc8e
1 changed files with 2 additions and 4 deletions
|
@ -628,9 +628,7 @@ void OpenAL_Sound3D::update()
|
|||
{
|
||||
ALfloat gain = mVolume*mBaseVolume;
|
||||
ALfloat pitch = mPitch;
|
||||
if(mPos.squaredDistance(mOutput.mPos) > mMaxDistance*mMaxDistance)
|
||||
gain = 0.0f;
|
||||
else if(!(mFlags&MWBase::SoundManager::Play_NoEnv) && mOutput.mLastEnvironment == Env_Underwater)
|
||||
if(!(mFlags&MWBase::SoundManager::Play_NoEnv) && mOutput.mLastEnvironment == Env_Underwater)
|
||||
{
|
||||
gain *= 0.9f;
|
||||
pitch *= 0.7f;
|
||||
|
@ -696,7 +694,7 @@ void OpenAL_Output::init(const std::string &devname)
|
|||
fail(std::string("Failed to setup context: ")+alcGetString(mDevice, alcGetError(mDevice)));
|
||||
}
|
||||
|
||||
alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED);
|
||||
alDistanceModel(AL_INVERSE_DISTANCE);
|
||||
throwALerror();
|
||||
|
||||
ALCint maxmono=0, maxstereo=0;
|
||||
|
|
Loading…
Reference in a new issue