Unstable 1.8.4.0
This commit is contained in:
@@ -62,6 +62,8 @@ namespace Barotrauma.Sounds
|
||||
public float BaseNear;
|
||||
public float BaseFar;
|
||||
|
||||
public bool MuteBackgroundMusic;
|
||||
|
||||
public Sound(SoundManager owner, string filename, bool stream, bool streamsReliably, ContentXElement xElement = null, bool getFullPath = true)
|
||||
{
|
||||
Owner = owner;
|
||||
@@ -102,19 +104,22 @@ namespace Barotrauma.Sounds
|
||||
public virtual SoundChannel Play(float gain, float range, Vector2 position, bool muffle = false)
|
||||
{
|
||||
LogWarningIfStillLoading();
|
||||
return new SoundChannel(this, gain, new Vector3(position.X, position.Y, 0.0f), 1.0f, range * 0.4f, range, "default", muffle);
|
||||
if (Owner.CountPlayingInstances(this) >= MaxSimultaneousInstances) { return null; }
|
||||
return new SoundChannel(this, gain, new Vector3(position.X, position.Y, 0.0f), 1.0f, range * 0.4f, range, SoundManager.SoundCategoryDefault, muffle);
|
||||
}
|
||||
|
||||
public virtual SoundChannel Play(float gain, float range, float freqMult, Vector2 position, bool muffle = false)
|
||||
{
|
||||
LogWarningIfStillLoading();
|
||||
return new SoundChannel(this, gain, new Vector3(position.X, position.Y, 0.0f), freqMult, range * 0.4f, range, "default", muffle);
|
||||
if (Owner.CountPlayingInstances(this) >= MaxSimultaneousInstances) { return null; }
|
||||
return new SoundChannel(this, gain, new Vector3(position.X, position.Y, 0.0f), freqMult, range * 0.4f, range, SoundManager.SoundCategoryDefault, muffle);
|
||||
}
|
||||
|
||||
public virtual SoundChannel Play(Vector3? position, float gain, float freqMult = 1.0f, bool muffle = false)
|
||||
{
|
||||
LogWarningIfStillLoading();
|
||||
return new SoundChannel(this, gain, position, freqMult, BaseNear, BaseFar, "default", muffle);
|
||||
if (Owner.CountPlayingInstances(this) >= MaxSimultaneousInstances) { return null; }
|
||||
return new SoundChannel(this, gain, position, freqMult, BaseNear, BaseFar, SoundManager.SoundCategoryDefault, muffle);
|
||||
}
|
||||
|
||||
public virtual SoundChannel Play(float gain)
|
||||
@@ -127,7 +132,7 @@ namespace Barotrauma.Sounds
|
||||
return Play(BaseGain);
|
||||
}
|
||||
|
||||
public virtual SoundChannel Play(float? gain, string category)
|
||||
public virtual SoundChannel Play(float? gain, Identifier category)
|
||||
{
|
||||
if (Owner.CountPlayingInstances(this) >= MaxSimultaneousInstances) { return null; }
|
||||
return new SoundChannel(this, gain ?? BaseGain, null, 1.0f, BaseNear, BaseFar, category);
|
||||
|
||||
Reference in New Issue
Block a user