Fix pneumatic cannon audio location (#5370)

This commit is contained in:
20kdc
2021-11-16 21:05:19 +00:00
committed by GitHub
parent 7eff8cc760
commit adefa610e0

View File

@@ -168,7 +168,7 @@ namespace Content.Server.PneumaticCannon
{ {
args.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas", args.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas",
("cannon", component.Owner))); ("cannon", component.Owner)));
SoundSystem.Play(Filter.Pvs(args.Used.Uid), "/Audio/Items/hiss.ogg"); SoundSystem.Play(Filter.Pvs(args.Used.Uid), "/Audio/Items/hiss.ogg", args.Used.Uid, AudioParams.Default);
return; return;
} }
AddToQueue(component, args.User, args.ClickLocation); AddToQueue(component, args.User, args.ClickLocation);
@@ -181,7 +181,7 @@ namespace Content.Server.PneumaticCannon
if (storage.StoredEntities == null) return; if (storage.StoredEntities == null) return;
if (storage.StoredEntities.Count == 0) if (storage.StoredEntities.Count == 0)
{ {
SoundSystem.Play(Filter.Pvs(comp.Owner.Uid), "/Audio/Weapons/click.ogg"); SoundSystem.Play(Filter.Pvs(comp.OwnerUid), "/Audio/Weapons/click.ogg", comp.OwnerUid, AudioParams.Default);
return; return;
} }
@@ -218,7 +218,7 @@ namespace Content.Server.PneumaticCannon
{ {
data.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas", data.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas",
("cannon", comp.Owner))); ("cannon", comp.Owner)));
SoundSystem.Play(Filter.Pvs(comp.Owner.Uid), "/Audio/Items/hiss.ogg"); SoundSystem.Play(Filter.Pvs(comp.OwnerUid), "/Audio/Items/hiss.ogg", comp.OwnerUid, AudioParams.Default);
return; return;
} }
@@ -234,7 +234,7 @@ namespace Content.Server.PneumaticCannon
IEntity ent = _random.Pick(storage.StoredEntities); IEntity ent = _random.Pick(storage.StoredEntities);
storage.Remove(ent); storage.Remove(ent);
SoundSystem.Play(Filter.Pvs(data.User), comp.FireSound.GetSound()); SoundSystem.Play(Filter.Pvs(data.User), comp.FireSound.GetSound(), comp.OwnerUid, AudioParams.Default);
if (data.User.TryGetComponent<CameraRecoilComponent>(out var recoil)) if (data.User.TryGetComponent<CameraRecoilComponent>(out var recoil))
{ {
recoil.Kick(Vector2.One * data.Strength); recoil.Kick(Vector2.One * data.Strength);