mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-26 14:56:39 +00:00 
			
		
		
		
	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 gain = mVolume*mBaseVolume; | ||||||
|     ALfloat pitch = mPitch; |     ALfloat pitch = mPitch; | ||||||
|     if(mPos.squaredDistance(mOutput.mPos) > mMaxDistance*mMaxDistance) |     if(!(mFlags&MWBase::SoundManager::Play_NoEnv) && mOutput.mLastEnvironment == Env_Underwater) | ||||||
|         gain = 0.0f; |  | ||||||
|     else if(!(mFlags&MWBase::SoundManager::Play_NoEnv) && mOutput.mLastEnvironment == Env_Underwater) |  | ||||||
|     { |     { | ||||||
|         gain *= 0.9f; |         gain *= 0.9f; | ||||||
|         pitch *= 0.7f; |         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))); |         fail(std::string("Failed to setup context: ")+alcGetString(mDevice, alcGetError(mDevice))); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED); |     alDistanceModel(AL_INVERSE_DISTANCE); | ||||||
|     throwALerror(); |     throwALerror(); | ||||||
| 
 | 
 | ||||||
|     ALCint maxmono=0, maxstereo=0; |     ALCint maxmono=0, maxstereo=0; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue