Purge uses of TransformComponent.AttachToGridOrMap (#34940)
Switches over all extant uses of TransformComponent.AttachToGridOrMap to use SharedTransformSystem.AttachToGridOrMap
This commit is contained in:
@@ -118,8 +118,9 @@ namespace Content.Server.Administration.Commands
|
||||
}
|
||||
|
||||
var xform = _entManager.GetComponent<TransformComponent>(playerEntity);
|
||||
var xformSystem = _entManager.System<SharedTransformSystem>();
|
||||
xform.Coordinates = coords;
|
||||
xform.AttachToGridOrMap();
|
||||
xformSystem.AttachToGridOrMap(playerEntity, xform);
|
||||
if (_entManager.TryGetComponent(playerEntity, out PhysicsComponent? physics))
|
||||
{
|
||||
_entManager.System<SharedPhysicsSystem>().SetLinearVelocity(playerEntity, Vector2.Zero, body: physics);
|
||||
|
||||
Reference in New Issue
Block a user