(3f55858c9) Made the volume and range parameters of SoundPlayer.PlaySound optional: if they're omitted, the values defined in the sound xml are used.

This commit is contained in:
Joonas Rikkonen
2019-04-24 11:49:27 +03:00
parent 402e13e78a
commit ba6a4450eb
12 changed files with 55 additions and 35 deletions
@@ -728,7 +728,7 @@ namespace Barotrauma
var matchingSoundsList = matchingSounds.ToList();
var selectedSound = matchingSoundsList[Rand.Int(matchingSoundsList.Count)];
soundChannel = SoundPlayer.PlaySound(selectedSound.Sound, selectedSound.Volume, selectedSound.Range, AnimController.WorldPosition, CurrentHull);
soundChannel = SoundPlayer.PlaySound(selectedSound.Sound, AnimController.WorldPosition, selectedSound.Volume, selectedSound.Range, CurrentHull);
soundTimer = soundInterval;
}
@@ -736,7 +736,7 @@ namespace Barotrauma
{
Vector2 centerOfMass = AnimController.GetCenterOfMass();
SoundPlayer.PlaySound("implode", 1.0f, 150.0f, WorldPosition);
SoundPlayer.PlaySound("implode", WorldPosition);
for (int i = 0; i < 10; i++)
{