Skip to content

Commit

Permalink
Docs cleanup for tile movement
Browse files Browse the repository at this point in the history
  • Loading branch information
spess-empyrean committed Jan 1, 2025
1 parent c944bfb commit 1190dee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
3 changes: 1 addition & 2 deletions Content.Shared/Movement/Components/TileMovementComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public sealed partial class TileMovementComponent : Component
public MoveButtons CurrentSlideMoveButtons;

/// <summary>
/// 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.
/// </summary>
[AutoNetworkedField]
public Vector2 LastTickPosition;
Expand Down
30 changes: 0 additions & 30 deletions Content.Shared/Movement/Systems/SharedMoverController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -807,36 +807,6 @@ private void ForceSnapToTile(EntityUid uid, InputMoverComponent inputMover)
}
}

/*
/// <summary>
/// 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.
/// </summary>
/// <param name="uid">UID of entity to be snapped.</param>
/// <param name="inputMover">InputMoverComponent on the entity to be snapped.</param>
private void ForceSnapToTile(EntityUid uid, InputMoverComponent inputMover)
{
if (HasComp<TransformComponent>(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);
}
}
*/

/// <summary>
/// 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.
Expand Down

0 comments on commit 1190dee

Please sign in to comment.