diff --git a/Content.Client/Interaction/DragDropSystem.cs b/Content.Client/Interaction/DragDropSystem.cs index 4145999579..969aaffe07 100644 --- a/Content.Client/Interaction/DragDropSystem.cs +++ b/Content.Client/Interaction/DragDropSystem.cs @@ -256,7 +256,7 @@ public sealed class DragDropSystem : SharedDragDropSystem dragSprite.DrawDepth = (int) DrawDepth.Overlays; if (!dragSprite.NoRotation) { - Transform(_dragShadow.Value).WorldRotation = Transform(_draggedEntity.Value).WorldRotation; + _transformSystem.SetWorldRotationNoLerp(_dragShadow.Value, _transformSystem.GetWorldRotation(_draggedEntity.Value)); } // drag initiated diff --git a/Content.Client/Maps/GridDraggingSystem.cs b/Content.Client/Maps/GridDraggingSystem.cs index 5bbf5ff500..a4883f73cf 100644 --- a/Content.Client/Maps/GridDraggingSystem.cs +++ b/Content.Client/Maps/GridDraggingSystem.cs @@ -121,7 +121,7 @@ public sealed class GridDraggingSystem : SharedGridDraggingSystem if (localToWorld.EqualsApprox(mousePos.Position, 0.01f)) return; - var requestedGridOrigin = mousePos.Position - xform.WorldRotation.RotateVec(_localPosition); + var requestedGridOrigin = mousePos.Position - _transformSystem.GetWorldRotation(xform).RotateVec(_localPosition); _lastMousePosition = new MapCoordinates(requestedGridOrigin, mousePos.MapId); RaiseNetworkEvent(new GridDragRequestPosition() diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs index 57a312c304..08e86ff400 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs @@ -137,7 +137,7 @@ public sealed partial class AdminVerbSystem var board = Spawn("ChessBoard", xform.Coordinates); var session = _tabletopSystem.EnsureSession(Comp(board)); xform.Coordinates = EntityCoordinates.FromMap(_mapManager, session.Position); - xform.WorldRotation = Angle.Zero; + _transformSystem.SetWorldRotationNoLerp((args.Target, xform), Angle.Zero); }, Impact = LogImpact.Extreme, Message = string.Join(": ", chessName, Loc.GetString("admin-smite-chess-dimension-description")) diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs index 0b43c92414..6a5b07bb17 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs @@ -118,7 +118,7 @@ namespace Content.Server.Atmos.EntitySystems return; // Used by ExperiencePressureDifference to correct push/throw directions from tile-relative to physics world. - var gridWorldRotation = xforms.GetComponent(gridAtmosphere).WorldRotation; + var gridWorldRotation = _transformSystem.GetWorldRotation(gridAtmosphere); // If we're using monstermos, smooth out the yeet direction to follow the flow if (MonstermosEqualization) diff --git a/Content.Server/Explosion/EntitySystems/ExplosionGridTileFlood.cs b/Content.Server/Explosion/EntitySystems/ExplosionGridTileFlood.cs index 2ddcc052d8..556e3771d2 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionGridTileFlood.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionGridTileFlood.cs @@ -69,14 +69,17 @@ public sealed class ExplosionGridTileFlood : ExplosionTileFlood return; _needToTransform = true; - var transform = IoCManager.Resolve().GetComponent(Grid.Owner); + var entityManager = IoCManager.Resolve(); + + var transformSystem = entityManager.System(); + var transform = entityManager.GetComponent(Grid.Owner); var size = (float) Grid.TileSize; _matrix.M31 = size / 2; _matrix.M32 = size / 2; Matrix3x2.Invert(spaceMatrix, out var invSpace); _matrix *= transform.WorldMatrix * invSpace; - var relativeAngle = transform.WorldRotation - spaceAngle; + var relativeAngle = transformSystem.GetWorldRotation(transform) - spaceAngle; _offset = relativeAngle.RotateVec(new Vector2(size / 4, size / 4)); } diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.cs index b08b66474b..be6b9148a4 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.cs @@ -71,7 +71,7 @@ public sealed partial class ExplosionSystem { var targetGrid = Comp(referenceGrid.Value); var xform = Transform(referenceGrid.Value); - targetAngle = xform.WorldRotation; + targetAngle = _transformSystem.GetWorldRotation(xform); targetMatrix = xform.InvWorldMatrix; tileSize = targetGrid.TileSize; } diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.TileFill.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.TileFill.cs index 7b73490d94..2946748e5d 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.TileFill.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.TileFill.cs @@ -90,7 +90,7 @@ public sealed partial class ExplosionSystem { var xform = Transform(Comp(referenceGrid.Value).Owner); spaceMatrix = xform.WorldMatrix; - spaceAngle = xform.WorldRotation; + spaceAngle = _transformSystem.GetWorldRotation(xform); } // is the explosion starting on a grid? diff --git a/Content.Server/Standing/StandingStateSystem.cs b/Content.Server/Standing/StandingStateSystem.cs index e2b6495844..bf9a4e4bea 100644 --- a/Content.Server/Standing/StandingStateSystem.cs +++ b/Content.Server/Standing/StandingStateSystem.cs @@ -13,6 +13,7 @@ public sealed class StandingStateSystem : EntitySystem [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly SharedHandsSystem _handsSystem = default!; [Dependency] private readonly ThrowingSystem _throwingSystem = default!; + [Dependency] private readonly SharedTransformSystem _transformSystem = default!; private void FallOver(EntityUid uid, StandingStateComponent component, DropHandItemsEvent args) { @@ -25,7 +26,7 @@ public sealed class StandingStateSystem : EntitySystem if (!TryComp(uid, out HandsComponent? handsComp)) return; - var worldRotation = EntityManager.GetComponent(uid).WorldRotation.ToVec(); + var worldRotation = _transformSystem.GetWorldRotation(uid).ToVec(); foreach (var hand in handsComp.Hands.Values) { if (hand.HeldEntity is not EntityUid held) diff --git a/Content.Shared/Maps/TurfHelpers.cs b/Content.Shared/Maps/TurfHelpers.cs index 9a0b273c29..71bbb35db7 100644 --- a/Content.Shared/Maps/TurfHelpers.cs +++ b/Content.Shared/Maps/TurfHelpers.cs @@ -120,10 +120,11 @@ namespace Content.Shared.Maps private static bool GetWorldTileBox(TileRef turf, out Box2Rotated res) { var entManager = IoCManager.Resolve(); + var xformSystem = entManager.System(); if (entManager.TryGetComponent(turf.GridUid, out var tileGrid)) { - var gridRot = entManager.GetComponent(turf.GridUid).WorldRotation; + var gridRot = xformSystem.GetWorldRotation(turf.GridUid); // This is scaled to 90 % so it doesn't encompass walls on other tiles. var tileBox = Box2.UnitCentered.Scale(0.9f);