Feet update (#9344)

* Footstep sounds update

* adjustments I thought of
This commit is contained in:
Kara
2022-07-02 02:54:39 -07:00
committed by GitHub
parent abf8d2804d
commit 11d68e6b36
40 changed files with 69 additions and 54 deletions

View File

@@ -36,7 +36,8 @@ namespace Content.Shared.Movement.Systems
private const float StepSoundMoveDistanceWalking = 1.5f;
private const float FootstepVariation = 0f;
private const float FootstepVolume = 1f;
private const float FootstepVolume = 6f;
private const float FootstepWalkingVolumeModifier = 0.2f;
/// <summary>
/// <see cref="CCVars.MinimumFrictionSpeed"/>
@@ -275,11 +276,12 @@ namespace Content.Shared.Movement.Systems
: worldTotal.ToWorldAngle();
xform.DeferUpdates = false;
if (TryGetSound(mover, mobMover, xform, out var variation, out var sound))
if (!weightless && TryGetSound(mover, mobMover, xform, out var variation, out var sound))
{
var soundModifier = mover.Sprinting ? 1.0f : FootstepWalkingVolumeModifier;
SoundSystem.Play(sound,
GetSoundPlayers(mover.Owner),
mover.Owner, AudioHelpers.WithVariation(variation).WithVolume(FootstepVolume));
mover.Owner, AudioHelpers.WithVariation(variation).WithVolume(FootstepVolume * soundModifier));
}
}