From 1190deecfc585194961682f08a0dd68f2307e0b7 Mon Sep 17 00:00:00 2001 From: spess-empyrean Date: Tue, 31 Dec 2024 21:39:19 -0600 Subject: [PATCH] Docs cleanup for tile movement --- .../Components/TileMovementComponent.cs | 3 +- .../Movement/Systems/SharedMoverController.cs | 30 ------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/Content.Shared/Movement/Components/TileMovementComponent.cs b/Content.Shared/Movement/Components/TileMovementComponent.cs index d89c2ec6fb99..c392fff916b2 100644 --- a/Content.Shared/Movement/Components/TileMovementComponent.cs +++ b/Content.Shared/Movement/Components/TileMovementComponent.cs @@ -45,8 +45,7 @@ public sealed partial class TileMovementComponent : Component public MoveButtons CurrentSlideMoveButtons; /// - /// Local coordinates of the entity on the last physics tick. Used to determine whether progress is being made - /// in the move. + /// Local coordinates of the entity on the last physics tick. /// [AutoNetworkedField] public Vector2 LastTickPosition; diff --git a/Content.Shared/Movement/Systems/SharedMoverController.cs b/Content.Shared/Movement/Systems/SharedMoverController.cs index 745d2a7dfa47..12bb0f0dd114 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.cs @@ -807,36 +807,6 @@ private void ForceSnapToTile(EntityUid uid, InputMoverComponent inputMover) } } - /* - /// - /// Instantly snaps/teleports an entity to the center of the tile it is currently standing on based on the - /// given grid. Does not trigger collisions. - /// - /// UID of entity to be snapped. - /// InputMoverComponent on the entity to be snapped. - private void ForceSnapToTile(EntityUid uid, InputMoverComponent inputMover) - { - if (HasComp(inputMover.RelativeEntity)) - { - var targetTransform = Transform(uid); - - var localCoordinates = targetTransform.Coordinates.Position; - var snappedCoordinates = new EntityCoordinates(inputMover.RelativeEntity.Value, SnapCoordinatesToTile(localCoordinates)); - - if (!localCoordinates.EqualsApprox(snappedCoordinates.Position)) - { - if (targetTransform.ParentUid.IsValid()) - { - var local2 = snappedCoordinates.WithEntityId(targetTransform.ParentUid, _transform, EntityManager).Position; - _transform.SetLocalPosition(uid, local2, targetTransform); - } - } - - PhysicsSystem.WakeBody(uid); - } - } - */ - /// /// Instantly snaps/teleports an entity to the center of the tile it is currently standing on based on the /// given grid. Does not trigger collisions.