Remove transform methods from mapgrid (#12233)
This commit is contained in:
@@ -14,15 +14,16 @@ namespace Content.Client.Atmos.Overlays
|
||||
{
|
||||
private readonly AtmosDebugOverlaySystem _atmosDebugOverlaySystem;
|
||||
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
||||
|
||||
public AtmosDebugOverlay()
|
||||
internal AtmosDebugOverlay(AtmosDebugOverlaySystem system)
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
_atmosDebugOverlaySystem = EntitySystem.Get<AtmosDebugOverlaySystem>();
|
||||
_atmosDebugOverlaySystem = system;
|
||||
}
|
||||
|
||||
protected override void Draw(in OverlayDrawArgs args)
|
||||
@@ -41,10 +42,11 @@ namespace Content.Client.Atmos.Overlays
|
||||
|
||||
foreach (var mapGrid in _mapManager.FindGridsIntersecting(mapId, worldBounds))
|
||||
{
|
||||
if (!_atmosDebugOverlaySystem.HasData(mapGrid.GridEntityId))
|
||||
if (!_atmosDebugOverlaySystem.HasData(mapGrid.GridEntityId) ||
|
||||
!_entManager.TryGetComponent<TransformComponent>(mapGrid.GridEntityId, out var xform))
|
||||
continue;
|
||||
|
||||
drawHandle.SetTransform(mapGrid.WorldMatrix);
|
||||
drawHandle.SetTransform(xform.WorldMatrix);
|
||||
|
||||
for (var pass = 0; pass < 2; pass++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user