Remove most usages of obsolete TransformComponent methods (#19571)
This commit is contained in:
@@ -48,7 +48,7 @@ namespace Content.Server.Administration.Commands
|
||||
? _entities.GetComponent<TransformComponent>(player.AttachedEntity.Value).Coordinates
|
||||
: EntitySystem.Get<GameTicker>().GetObserverSpawnPoint();
|
||||
var ghost = _entities.SpawnEntity("AdminObserver", coordinates);
|
||||
_entities.GetComponent<TransformComponent>(ghost).AttachToGridOrMap();
|
||||
_entities.System<SharedTransformSystem>().AttachToGridOrMap(ghost);
|
||||
|
||||
if (canReturn)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -121,9 +122,9 @@ namespace Content.Server.Administration.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
var xform = _entManager.GetComponent<TransformComponent>(playerEntity);
|
||||
xform.Coordinates = coords;
|
||||
xform.AttachToGridOrMap();
|
||||
var transform = _entManager.System<SharedTransformSystem>();
|
||||
transform.SetCoordinates(playerEntity, coords);
|
||||
transform.AttachToGridOrMap(playerEntity);
|
||||
if (_entManager.TryGetComponent(playerEntity, out PhysicsComponent? physics))
|
||||
{
|
||||
_entManager.System<SharedPhysicsSystem>().SetLinearVelocity(playerEntity, Vector2.Zero, body: physics);
|
||||
|
||||
Reference in New Issue
Block a user