- PowerContainer capacity is initialized before charge to allow setting the charge higher than default capacity
- soundplayer doesn't crash the game if it can't stream a music clip - some new structure prefabs - more effective corrigodone (health med)
This commit is contained in:
@@ -7,6 +7,7 @@ using FarseerPhysics.Dynamics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Barotrauma.Sounds;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -249,7 +250,16 @@ namespace Barotrauma
|
||||
if (currMusicVolume < 0.01f)
|
||||
{
|
||||
Sound.StopStream();
|
||||
if (targetMusic != null) Sound.StartStream(targetMusic.file, currMusicVolume);
|
||||
|
||||
try
|
||||
{
|
||||
if (targetMusic != null) Sound.StartStream(targetMusic.file, currMusicVolume);
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
DebugConsole.ThrowError("Music clip " + targetMusic.file + " not found!");
|
||||
}
|
||||
|
||||
currentMusic = targetMusic;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user