Skip to content

Commit

Permalink
FINALLY FIX PULLING GAH
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Aug 19, 2024
1 parent b7531e7 commit 101cd30
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Content.Shared/Floofstation/Leash/LeashSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 101cd30

Please sign in to comment.