Fixed OpenAL errors when removing looping sounds

The sounds didn't save their source id in the Sound.Loop method, so they couldn't stop the playback upon removal which caused errors when unbinding and deleting the (still playing) sound buffer
This commit is contained in:
Regalis
2017-02-27 19:02:33 +02:00
parent c9f09031de
commit c3b8f2a1db

View File

@@ -198,8 +198,8 @@ namespace Barotrauma
return sourceIndex;
}
return SoundManager.Loop(this, sourceIndex, relativePos/100.0f, volume);
alSourceId = SoundManager.Loop(this, sourceIndex, relativePos / 100.0f, volume);
return alSourceId;
}
public bool IsPlaying