From aa883be67e18f4b821f2e4dcbb4e321f18f6707b Mon Sep 17 00:00:00 2001 From: Spatison <137375981+Spatison@users.noreply.github.com> Date: Wed, 31 Jul 2024 07:21:03 +0300 Subject: [PATCH] =?UTF-8?q?Tweak:=20=D0=A2=D0=B0=D1=81=D0=BA=D0=B0=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BB=D0=B5=D0=B6=D0=B0=20=D1=81=D1=82=D0=B0=D0=BB?= =?UTF-8?q?=D0=BE=20=D1=81=D0=BB=D0=BE=D0=B6=D0=BD=D0=B5=D0=B5=20(#517)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Shared/Movement/Pulling/Systems/PullingSystem.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs b/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs index e2ca373576..6935c6e153 100644 --- a/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs +++ b/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs @@ -16,6 +16,7 @@ using Content.Shared.Movement.Systems; using Content.Shared.Pulling.Events; using Content.Shared.Throwing; using Content.Shared.Verbs; +using Content.Shared.Standing.Systems; using Robust.Shared.Containers; using Robust.Shared.Input.Binding; using Robust.Shared.Map; @@ -43,6 +44,7 @@ public sealed class PullingSystem : EntitySystem [Dependency] private readonly SharedHandsSystem _handsSystem = default!; [Dependency] private readonly SharedInteractionSystem _interaction = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; + [Dependency] private readonly SharedStandingStateSystem _standing = default!; public override void Initialize() { @@ -142,6 +144,12 @@ public sealed class PullingSystem : EntitySystem private void OnRefreshMovespeed(EntityUid uid, PullerComponent component, RefreshMovementSpeedModifiersEvent args) { + if (_standing.IsDown(uid)) + { + args.ModifySpeed(component.WalkSpeedModifier * 0.5f, component.SprintSpeedModifier * 0.5f); + return; + } + args.ModifySpeed(component.WalkSpeedModifier, component.SprintSpeedModifier); }