* Revert "Fix chat bubbles (#25643)" This reverts commit23d2c4d924. * Revert "Fixes obsolete Transform warnings in Content. (#25256)" This reverts commitf284b43ff6.
This commit is contained in:
@@ -9,7 +9,6 @@ public sealed class HTNOverlay : Overlay
|
||||
{
|
||||
private readonly IEntityManager _entManager = default!;
|
||||
private readonly Font _font = default!;
|
||||
private SharedTransformSystem? _xformSystem = null;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.ScreenSpace;
|
||||
|
||||
@@ -24,10 +23,6 @@ public sealed class HTNOverlay : Overlay
|
||||
if (args.ViewportControl == null)
|
||||
return;
|
||||
|
||||
_xformSystem ??= _entManager.SystemOrNull<SharedTransformSystem>();
|
||||
if (_xformSystem is null)
|
||||
return;
|
||||
|
||||
var handle = args.ScreenHandle;
|
||||
|
||||
foreach (var (comp, xform) in _entManager.EntityQuery<HTNComponent, TransformComponent>(true))
|
||||
@@ -35,7 +30,7 @@ public sealed class HTNOverlay : Overlay
|
||||
if (string.IsNullOrEmpty(comp.DebugText) || xform.MapID != args.MapId)
|
||||
continue;
|
||||
|
||||
var worldPos = _xformSystem.GetWorldPosition(xform);
|
||||
var worldPos = xform.WorldPosition;
|
||||
|
||||
if (!args.WorldAABB.Contains(worldPos))
|
||||
continue;
|
||||
|
||||
@@ -89,10 +89,6 @@ public sealed class NPCSteeringOverlay : Overlay
|
||||
|
||||
protected override void Draw(in OverlayDrawArgs args)
|
||||
{
|
||||
var xformSystem = _entManager.SystemOrNull<SharedTransformSystem>();
|
||||
if (xformSystem is null)
|
||||
return;
|
||||
|
||||
foreach (var (comp, mover, xform) in _entManager.EntityQuery<NPCSteeringComponent, InputMoverComponent, TransformComponent>(true))
|
||||
{
|
||||
if (xform.MapID != args.MapId)
|
||||
@@ -100,7 +96,7 @@ public sealed class NPCSteeringOverlay : Overlay
|
||||
continue;
|
||||
}
|
||||
|
||||
var (worldPos, worldRot) = xformSystem.GetWorldPositionRotation(xform);
|
||||
var (worldPos, worldRot) = xform.GetWorldPositionRotation();
|
||||
|
||||
if (!args.WorldAABB.Contains(worldPos))
|
||||
continue;
|
||||
|
||||
@@ -140,7 +140,6 @@ namespace Content.Client.NPC
|
||||
private readonly IMapManager _mapManager;
|
||||
private readonly PathfindingSystem _system;
|
||||
private readonly MapSystem _mapSystem;
|
||||
private readonly SharedTransformSystem _xformSystem;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.ScreenSpace | OverlaySpace.WorldSpace;
|
||||
|
||||
@@ -162,7 +161,6 @@ namespace Content.Client.NPC
|
||||
_mapManager = mapManager;
|
||||
_system = system;
|
||||
_mapSystem = mapSystem;
|
||||
_xformSystem = _entManager.System<SharedTransformSystem>();
|
||||
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 10);
|
||||
}
|
||||
|
||||
@@ -201,7 +199,7 @@ namespace Content.Client.NPC
|
||||
if (found || !_system.Breadcrumbs.TryGetValue(netGrid, out var crumbs) || !xformQuery.TryGetComponent(grid, out var gridXform))
|
||||
continue;
|
||||
|
||||
var (_, _, worldMatrix, invWorldMatrix) = _xformSystem.GetWorldPositionRotationMatrixWithInv(gridXform);
|
||||
var (_, _, worldMatrix, invWorldMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv();
|
||||
var localAABB = invWorldMatrix.TransformBox(aabb.Enlarged(float.Epsilon - SharedPathfindingSystem.ChunkSize));
|
||||
|
||||
foreach (var chunk in crumbs)
|
||||
@@ -285,7 +283,7 @@ namespace Content.Client.NPC
|
||||
return;
|
||||
}
|
||||
|
||||
var invGridMatrix = _xformSystem.GetInvWorldMatrix(gridXform);
|
||||
var invGridMatrix = gridXform.InvWorldMatrix;
|
||||
DebugPathPoly? nearest = null;
|
||||
var nearestDistance = float.MaxValue;
|
||||
|
||||
@@ -358,7 +356,7 @@ namespace Content.Client.NPC
|
||||
continue;
|
||||
}
|
||||
|
||||
var (_, _, worldMatrix, invWorldMatrix) = _xformSystem.GetWorldPositionRotationMatrixWithInv(gridXform);
|
||||
var (_, _, worldMatrix, invWorldMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv();
|
||||
worldHandle.SetTransform(worldMatrix);
|
||||
var localAABB = invWorldMatrix.TransformBox(aabb);
|
||||
|
||||
@@ -418,7 +416,7 @@ namespace Content.Client.NPC
|
||||
!xformQuery.TryGetComponent(grid, out var gridXform))
|
||||
continue;
|
||||
|
||||
var (_, _, worldMatrix, invWorldMatrix) = _xformSystem.GetWorldPositionRotationMatrixWithInv(gridXform);
|
||||
var (_, _, worldMatrix, invWorldMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv();
|
||||
worldHandle.SetTransform(worldMatrix);
|
||||
var localAABB = invWorldMatrix.TransformBox(aabb);
|
||||
|
||||
@@ -457,7 +455,7 @@ namespace Content.Client.NPC
|
||||
!xformQuery.TryGetComponent(grid, out var gridXform))
|
||||
continue;
|
||||
|
||||
var (_, _, worldMatrix, invMatrix) = _xformSystem.GetWorldPositionRotationMatrixWithInv(gridXform);
|
||||
var (_, _, worldMatrix, invMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv();
|
||||
worldHandle.SetTransform(worldMatrix);
|
||||
var localAABB = invMatrix.TransformBox(aabb);
|
||||
|
||||
@@ -516,7 +514,7 @@ namespace Content.Client.NPC
|
||||
!xformQuery.TryGetComponent(grid, out var gridXform))
|
||||
continue;
|
||||
|
||||
var (_, _, worldMatrix, invWorldMatrix) = _xformSystem.GetWorldPositionRotationMatrixWithInv(gridXform);
|
||||
var (_, _, worldMatrix, invWorldMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv();
|
||||
worldHandle.SetTransform(worldMatrix);
|
||||
var localAABB = invWorldMatrix.TransformBox(args.WorldBounds);
|
||||
|
||||
@@ -543,7 +541,7 @@ namespace Content.Client.NPC
|
||||
if (!_entManager.TryGetComponent<TransformComponent>(_entManager.GetEntity(node.GraphUid), out var graphXform))
|
||||
continue;
|
||||
|
||||
worldHandle.SetTransform(_xformSystem.GetWorldMatrix(graphXform));
|
||||
worldHandle.SetTransform(graphXform.WorldMatrix);
|
||||
worldHandle.DrawRect(node.Box, Color.Orange.WithAlpha(0.10f));
|
||||
}
|
||||
}
|
||||
@@ -567,7 +565,7 @@ namespace Content.Client.NPC
|
||||
continue;
|
||||
|
||||
matrix = graph;
|
||||
worldHandle.SetTransform(_xformSystem.GetWorldMatrix(graphXform));
|
||||
worldHandle.SetTransform(graphXform.WorldMatrix);
|
||||
}
|
||||
|
||||
worldHandle.DrawRect(node.Box, new Color(0f, cost / highestGScore, 1f - (cost / highestGScore), 0.10f));
|
||||
|
||||
Reference in New Issue
Block a user