Fix rifles making sound on spawn (#1021)

This commit is contained in:
Hugal31
2020-05-28 13:02:06 +02:00
committed by GitHub
parent 0e2f4fda31
commit 0171c3bd93

View File

@@ -103,7 +103,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Projectile
{
return false;
}
if (_magInSound != null)
if (_magInSound != null && playSound)
{
Owner.GetComponent<SoundComponent>().Play(_magInSound);
}
@@ -132,7 +132,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Projectile
if (_magazineSlot.Remove(entity))
{
entity.Transform.GridPosition = Owner.Transform.GridPosition;
if (_magOutSound != null)
if (_magOutSound != null && playSound)
{
Owner.GetComponent<SoundComponent>().Play(_magOutSound, AudioParams.Default.WithVolume(20));
}