Fire sound fix: the sounds were freed after each round without ever loading them again. The sound objects still existed and had some buffer ID assigned though, causing an incorrect clip to be played or OpenAL errors to be thrown on successive rounds. (Now freed sounds always have a buffer ID of -1)
This commit is contained in:
@@ -242,7 +242,11 @@ namespace Barotrauma
|
||||
SoundManager.ClearAlSource(AlBufferId);
|
||||
ALHelper.Check();
|
||||
|
||||
if (oggSound != null) oggSound.Dispose();
|
||||
if (oggSound != null)
|
||||
{
|
||||
oggSound.Dispose();
|
||||
oggSound = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user