space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.57k stars 3.19k forks source link

Pull joints should break based on distance #31214

Open LucasTheDrgn opened 4 weeks ago

LucasTheDrgn commented 4 weeks ago

Being moved a large distance while pulling something should "yank it out of your hands" so to speak. As of right now, being teleported causes you to do your best Mr. Danny Phantastic impression, using your elastic ghost powers to pull you and the object you were dragging to a midpoint between whre you started and your intended location. Both portals and the QSI have* logic to handle this, but both come with client-side prediction issues, and ideally it should be handled by the joint to break itself if you're far enough away.

*At time of writing there is an open PR to add logic to the QSI for this. That's where this comment comes from.

          i feel like this is better served by making pulling logic more robust so it actually breaks joints when outside of a reasonable distance rather than just keeping it specifically here.

_Originally posted by @EmoGarbage404 in https://github.com/space-wizards/space-station-14/pull/31177#discussion_r1721117023_

LucasTheDrgn commented 4 weeks ago

The existing band-aid code to handle this situation that I've identified is Content.Shared/Teleportation/Systems/SharedPortalSystem.cs at line 95, and SwapTeleporterSystem.cs at line 189*

*once again, at time of writing, contingent on pr #31177. Prior to this getting pulled, using a QSI while dragging something will just give you a teleporter accident.