From 101cd30682027b1615f2a1a64f76a1777daed1cb Mon Sep 17 00:00:00 2001 From: fox Date: Mon, 19 Aug 2024 20:28:41 +0300 Subject: [PATCH] FINALLY FIX PULLING GAH --- Content.Shared/Floofstation/Leash/LeashSystem.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Content.Shared/Floofstation/Leash/LeashSystem.cs b/Content.Shared/Floofstation/Leash/LeashSystem.cs index 89aa1a9b334..a771204d606 100644 --- a/Content.Shared/Floofstation/Leash/LeashSystem.cs +++ b/Content.Shared/Floofstation/Leash/LeashSystem.cs @@ -235,11 +235,9 @@ private bool OnRequestPullLeash(ICommonSession? session, EntityCoordinates targe var pulled = candidates.MinBy(it => it.Item2).Item1; var playerCoords = Transform(player).Coordinates; var pulledCoords = Transform(pulled).Coordinates; - if (!playerCoords.TryDelta(EntityManager, _xform, pulledCoords, out var delta)) - return false; + var pullDir = _xform.ToMapCoordinates(playerCoords).Position - _xform.ToMapCoordinates(pulledCoords).Position; - var pullTarget = playerCoords.WithPosition(delta.Normalized() * 0.5f).ToMapPos(EntityManager, _xform); - _throwing.TryThrow(pulled, pullTarget, user: player, pushbackRatio: 1f, strength: 1.5f, animated: false, recoil: false, playSound: false, doSpin: false); + _throwing.TryThrow(pulled, pullDir * 0.5f, user: player, pushbackRatio: 1f, strength: 3f, animated: false, recoil: false, playSound: false, doSpin: false); leashComp.NextPull = _timing.CurTime + leashComp.PullInterval; return true;