moves magic number from SharedMoverController to InputMoverComponent (#40411)
This commit is contained in:
@@ -76,6 +76,8 @@ namespace Content.Shared.Movement.Components
|
||||
public TimeSpan LerpTarget;
|
||||
|
||||
public const float LerpTime = 1.0f;
|
||||
public const float SprintingSoundModifier = 3.5f;
|
||||
public const float WalkingSoundModifier = 1.5f;
|
||||
|
||||
public bool Sprinting => (HeldMoveButtons & MoveButtons.Walk) == 0x0;
|
||||
|
||||
|
||||
@@ -331,7 +331,8 @@ public abstract partial class SharedMoverController : VirtualController
|
||||
if (!weightless && MobMoverQuery.TryGetComponent(uid, out var mobMover) &&
|
||||
TryGetSound(weightless, uid, mover, mobMover, xform, out var sound, tileDef: tileDef))
|
||||
{
|
||||
var soundModifier = mover.Sprinting ? 3.5f : 1.5f;
|
||||
var soundModifier = mover.Sprinting ? InputMoverComponent.SprintingSoundModifier
|
||||
: InputMoverComponent.WalkingSoundModifier;
|
||||
|
||||
var audioParams = sound.Params
|
||||
.WithVolume(sound.Params.Volume + soundModifier)
|
||||
|
||||
Reference in New Issue
Block a user