Skip to content

Commit

Permalink
Fix Ripley Hydraulic Clamp (#1344)
Browse files Browse the repository at this point in the history
# Description

Fix a bug in `MechGrabberSystem` causing the hydraulic clamps in Ripley
to drop items far away.

---

<details><summary><h1>Media</h1></summary>
<p>


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

</p>
</details>

---

# Changelog

:cl:
- fix: Hydraulic clamps now drop entities correctly
  • Loading branch information
Kyoth25f authored Dec 14, 2024
1 parent 3e3ca59 commit f0e4612
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit f0e4612

Please sign in to comment.