]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
moves magic number from SharedMoverController to InputMoverComponent (#40411)
authorLordbrandon12 <107556696+Lordbrandon12@users.noreply.github.com>
Sat, 20 Sep 2025 18:35:07 +0000 (15:35 -0300)
committerGitHub <noreply@github.com>
Sat, 20 Sep 2025 18:35:07 +0000 (11:35 -0700)
Content.Shared/Movement/Components/InputMoverComponent.cs
Content.Shared/Movement/Systems/SharedMoverController.cs

index 87da601f76f705abd33f025f804ca6fe3165f5f7..a1ed2b37e582ef737126f00bf8444868a354e23f 100644 (file)
@@ -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;
 
index b3c84aed4d3718083182a8313f29e3dd9b04eade..5d24b166215e620ed885ec5e76a04e5fbf26aad6 100644 (file)
@@ -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)