Sound effect plays when an item is thrown (#2767)

* Adds toss.ogg to the project's resources

* Thrown items will now play a sound effect
This commit is contained in:
RemberBL
2020-12-27 10:30:47 +01:00
committed by GitHub
parent 78fdd64a43
commit be48a25c14
2 changed files with 5 additions and 1 deletions

View File

@@ -1,8 +1,9 @@
using Content.Server.GameObjects.EntitySystems.Click;
using Content.Server.GameObjects.EntitySystems.Click;
using Content.Shared.Damage;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Damage;
using Content.Shared.Physics;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
using Robust.Shared.GameObjects.Components.Timers;
@@ -98,6 +99,9 @@ namespace Content.Server.GameObjects.Components.Projectiles
var controller = comp.EnsureController<ThrownController>();
controller.Push(direction, speed);
EntitySystem.Get<AudioSystem>()
.PlayFromEntity("/Audio/Effects/toss.ogg", Owner);
StartStopTimer();
}