From 857c65d9680ee0769698a3a9662753a0ff5c2b58 Mon Sep 17 00:00:00 2001 From: tmtmtl30 <53132901+tmtmtl30@users.noreply.github.com> Date: Fri, 12 Feb 2021 01:31:19 -0800 Subject: [PATCH] ABSURDLY important footstep change (#3147) * +1 db * -.25db, different volume walking vs. running --- Content.Server/GameObjects/EntitySystems/MoverSystem.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Content.Server/GameObjects/EntitySystems/MoverSystem.cs b/Content.Server/GameObjects/EntitySystems/MoverSystem.cs index 0cfd50770e..10f30a3e36 100644 --- a/Content.Server/GameObjects/EntitySystems/MoverSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/MoverSystem.cs @@ -1,4 +1,4 @@ -#nullable enable +#nullable enable using Content.Server.GameObjects.Components.GUI; using Content.Server.GameObjects.Components.Items.Storage; using Content.Server.GameObjects.Components.Mobs; @@ -11,6 +11,7 @@ using Content.Shared.Maps; using Content.Shared.Physics; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Log; @@ -108,12 +109,12 @@ namespace Content.Server.GameObjects.EntitySystems } else { - PlayFootstepSound(transform.Coordinates); + PlayFootstepSound(transform.Coordinates, mover.Sprinting); } } } - private void PlayFootstepSound(EntityCoordinates coordinates) + private void PlayFootstepSound(EntityCoordinates coordinates, bool sprinting) { // Step one: figure out sound collection prototype. var grid = _mapManager.GetGrid(coordinates.GetGridId(EntityManager)); @@ -149,7 +150,7 @@ namespace Content.Server.GameObjects.EntitySystems { var soundCollection = _prototypeManager.Index(soundCollectionName); var file = _robustRandom.Pick(soundCollection.PickFiles); - _audioSystem.PlayAtCoords(file, coordinates); + _audioSystem.PlayAtCoords(file, coordinates, sprinting ? AudioParams.Default.WithVolume(0.75f) : null); } catch (UnknownPrototypeException) {