mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-04 09:56:42 +00:00 
			
		
		
		
	Properly update the near water sound volume
This commit is contained in:
		
							parent
							
								
									0b720cd90c
								
							
						
					
					
						commit
						033303b911
					
				
					 1 changed files with 16 additions and 13 deletions
				
			
		| 
						 | 
					@ -931,11 +931,14 @@ namespace MWSound
 | 
				
			||||||
                mOutput->finishSound(mNearWaterSound);
 | 
					                mOutput->finishSound(mNearWaterSound);
 | 
				
			||||||
                mNearWaterSound = nullptr;
 | 
					                mNearWaterSound = nullptr;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else if(LastCell != curcell)
 | 
					            else
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                bool soundIdChanged = false;
 | 
					                bool soundIdChanged = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Sound_Buffer *sfx = lookupSound(soundId);
 | 
					                Sound_Buffer *sfx = lookupSound(soundId);
 | 
				
			||||||
 | 
					                if(LastCell != curcell)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    LastCell = curcell;
 | 
				
			||||||
                    SoundMap::const_iterator snditer = mActiveSounds.find(MWWorld::Ptr());
 | 
					                    SoundMap::const_iterator snditer = mActiveSounds.find(MWWorld::Ptr());
 | 
				
			||||||
                    if(snditer != mActiveSounds.end())
 | 
					                    if(snditer != mActiveSounds.end())
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
| 
						 | 
					@ -947,8 +950,8 @@ namespace MWSound
 | 
				
			||||||
                        if (pairiter != snditer->second.end() && pairiter->second != sfx)
 | 
					                        if (pairiter != snditer->second.end() && pairiter->second != sfx)
 | 
				
			||||||
                            soundIdChanged = true;
 | 
					                            soundIdChanged = true;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                LastCell = curcell;
 | 
					 | 
				
			||||||
                if(soundIdChanged)
 | 
					                if(soundIdChanged)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    mOutput->finishSound(mNearWaterSound);
 | 
					                    mOutput->finishSound(mNearWaterSound);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue