Fix rifles making sound on spawn (#1021)
This commit is contained in:
@@ -103,7 +103,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Projectile
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (_magInSound != null)
|
if (_magInSound != null && playSound)
|
||||||
{
|
{
|
||||||
Owner.GetComponent<SoundComponent>().Play(_magInSound);
|
Owner.GetComponent<SoundComponent>().Play(_magInSound);
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Projectile
|
|||||||
if (_magazineSlot.Remove(entity))
|
if (_magazineSlot.Remove(entity))
|
||||||
{
|
{
|
||||||
entity.Transform.GridPosition = Owner.Transform.GridPosition;
|
entity.Transform.GridPosition = Owner.Transform.GridPosition;
|
||||||
if (_magOutSound != null)
|
if (_magOutSound != null && playSound)
|
||||||
{
|
{
|
||||||
Owner.GetComponent<SoundComponent>().Play(_magOutSound, AudioParams.Default.WithVolume(20));
|
Owner.GetComponent<SoundComponent>().Play(_magOutSound, AudioParams.Default.WithVolume(20));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user