From f0e4612612fe18a126cdf47d712b63bc083b5483 Mon Sep 17 00:00:00 2001 From: Kyoth25f <41803390+Kyoth25f@users.noreply.github.com> Date: Sat, 14 Dec 2024 01:22:16 -0300 Subject: [PATCH] Fix Ripley Hydraulic Clamp (#1344) # Description Fix a bug in `MechGrabberSystem` causing the hydraulic clamps in Ripley to drop items far away. ---

Media

https://github.com/user-attachments/assets/d2c8e951-e391-42d7-b45d-78a275dc8bf2

--- # Changelog :cl: - fix: Hydraulic clamps now drop entities correctly --- .../Mech/Equipment/EntitySystems/MechGrabberSystem.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Content.Server/Mech/Equipment/EntitySystems/MechGrabberSystem.cs b/Content.Server/Mech/Equipment/EntitySystems/MechGrabberSystem.cs index e04499e2abc..194ef532ba2 100644 --- a/Content.Server/Mech/Equipment/EntitySystems/MechGrabberSystem.cs +++ b/Content.Server/Mech/Equipment/EntitySystems/MechGrabberSystem.cs @@ -83,10 +83,9 @@ public void RemoveItem(EntityUid uid, EntityUid mech, EntityUid toRemove, MechGr var xform = Transform(toRemove); _transform.AttachToGridOrMap(toRemove, xform); var (mechPos, mechRot) = _transform.GetWorldPositionRotation(mechxform); - var toRemoveWorldPos = _transform.GetWorldPosition(xform); var offset = mechPos + mechRot.RotateVec(component.DepositOffset); - _transform.SetWorldPositionRotation(toRemove, toRemoveWorldPos + offset, Angle.Zero); + _transform.SetWorldPositionRotation(toRemove, offset, Angle.Zero); _mech.UpdateUserInterface(mech); } @@ -157,7 +156,7 @@ private void OnInteract(EntityUid uid, MechGrabberComponent component, UserActiv args.Handled = true; var audio = _audio.PlayPvs(component.GrabSound, uid); - + if (audio == null) return;