SoundPlayer.GetSound doesn't attempt to load the sound if a sound with a matching tag is not found, because otherwise configuring limb hit sounds and such with the file path instead of the tag will cause a new sound instance to be created every time the sound is played (and these instances are never freed). + Sound config files can be now configured in content packages.

This commit is contained in:
Joonas Rikkonen
2018-02-24 19:41:28 +02:00
parent 313fb35b4a
commit 127cc28af3
3 changed files with 38 additions and 29 deletions
@@ -18,7 +18,8 @@ namespace Barotrauma
LevelGenerationParameters,
RandomEvents,
Missions,
BackgroundCreaturePrefabs, BackgroundSpritePrefabs
BackgroundCreaturePrefabs, BackgroundSpritePrefabs,
Sounds
}
public class ContentPackage