Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)
This commit is contained in:
@@ -35,7 +35,6 @@ public sealed class NavMapSystem : SharedNavMapSystem
|
||||
public sealed class NavMapOverlay : Overlay
|
||||
{
|
||||
private readonly IEntityManager _entManager;
|
||||
private readonly SharedTransformSystem _transform;
|
||||
private readonly IMapManager _mapManager;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
||||
@@ -43,7 +42,6 @@ public sealed class NavMapOverlay : Overlay
|
||||
public NavMapOverlay(IEntityManager entManager, IMapManager mapManager)
|
||||
{
|
||||
_entManager = entManager;
|
||||
_transform = entManager.System<SharedTransformSystem>();
|
||||
_mapManager = mapManager;
|
||||
}
|
||||
|
||||
@@ -59,7 +57,7 @@ public sealed class NavMapOverlay : Overlay
|
||||
continue;
|
||||
|
||||
// TODO: Faster helper method
|
||||
var (_, _, matrix, invMatrix) = _transform.GetWorldPositionRotationMatrixWithInv(xform);
|
||||
var (_, _, matrix, invMatrix) = xform.GetWorldPositionRotationMatrixWithInv();
|
||||
|
||||
var localAABB = invMatrix.TransformBox(args.WorldBounds);
|
||||
Matrix3.Multiply(in scale, in matrix, out var matty);
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace Content.Client.Pinpointer.UI;
|
||||
public sealed class NavMapControl : MapGridControl
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
private readonly SharedTransformSystem _transform;
|
||||
|
||||
public EntityUid? MapUid;
|
||||
|
||||
@@ -53,9 +52,6 @@ public sealed class NavMapControl : MapGridControl
|
||||
public NavMapControl() : base(8f, 128f, 48f)
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
_transform = _entManager.System<SharedTransformSystem>();
|
||||
|
||||
RectClipContent = true;
|
||||
HorizontalExpand = true;
|
||||
VerticalExpand = true;
|
||||
@@ -330,7 +326,7 @@ public sealed class NavMapControl : MapGridControl
|
||||
|
||||
if (mapPos.MapId != MapId.Nullspace)
|
||||
{
|
||||
var position = _transform.GetInvWorldMatrix(xform).Transform(mapPos.Position) - offset;
|
||||
var position = xform.InvWorldMatrix.Transform(mapPos.Position) - offset;
|
||||
position = Scale(new Vector2(position.X, -position.Y));
|
||||
|
||||
handle.DrawCircle(position, MinimapScale / 2f, value.Color);
|
||||
|
||||
Reference in New Issue
Block a user