Remove most usages of obsolete TransformComponent methods (#19571)

This commit is contained in:
Visne
2023-08-30 04:05:19 +02:00
committed by GitHub
parent 3ba60835ec
commit 1416942bea
91 changed files with 312 additions and 221 deletions

View File

@@ -13,6 +13,7 @@ public sealed class GridDraggingSystem : SharedGridDraggingSystem
{
[Dependency] private readonly IConGroupController _admin = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
private readonly HashSet<ICommonSession> _draggers = new();
@@ -65,10 +66,11 @@ public sealed class GridDraggingSystem : SharedGridDraggingSystem
if (args.SenderSession is not IPlayerSession playerSession ||
!_admin.CanCommand(playerSession, CommandName) ||
!Exists(msg.Grid) ||
Deleted(msg.Grid)) return;
Deleted(msg.Grid))
{
return;
}
var gridXform = Transform(msg.Grid);
gridXform.WorldPosition = msg.WorldPosition;
_transform.SetWorldPosition(msg.Grid, msg.WorldPosition);
}
}