Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)

This commit is contained in:
metalgearsloth
2023-09-01 12:30:29 +10:00
committed by GitHub
parent 37222930d9
commit 4cfc578011
91 changed files with 227 additions and 315 deletions

View File

@@ -4,7 +4,6 @@ using Content.Server.Warps;
using Content.Shared.Administration;
using Content.Shared.Follower;
using Content.Shared.Ghost;
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Console;
using Robust.Shared.Enums;
@@ -122,9 +121,9 @@ namespace Content.Server.Administration.Commands
return;
}
var transform = _entManager.System<SharedTransformSystem>();
transform.SetCoordinates(playerEntity, coords);
transform.AttachToGridOrMap(playerEntity);
var xform = _entManager.GetComponent<TransformComponent>(playerEntity);
xform.Coordinates = coords;
xform.AttachToGridOrMap();
if (_entManager.TryGetComponent(playerEntity, out PhysicsComponent? physics))
{
_entManager.System<SharedPhysicsSystem>().SetLinearVelocity(playerEntity, Vector2.Zero, body: physics);