Minor decal change (#21860)
This commit is contained in:
@@ -30,21 +30,22 @@ namespace Content.Client.Decals.Overlays
|
|||||||
{
|
{
|
||||||
// Shouldn't need to clear cached textures unless the prototypes get reloaded.
|
// Shouldn't need to clear cached textures unless the prototypes get reloaded.
|
||||||
var handle = args.WorldHandle;
|
var handle = args.WorldHandle;
|
||||||
var xformQuery = _entManager.GetEntityQuery<TransformComponent>();
|
|
||||||
var xformSystem = _entManager.System<TransformSystem>();
|
var xformSystem = _entManager.System<TransformSystem>();
|
||||||
var eyeAngle = args.Viewport.Eye?.Rotation ?? Angle.Zero;
|
var eyeAngle = args.Viewport.Eye?.Rotation ?? Angle.Zero;
|
||||||
|
|
||||||
foreach (var (decalGrid, xform) in _entManager.EntityQuery<DecalGridComponent, TransformComponent>(true))
|
var gridQuery = _entManager.AllEntityQueryEnumerator<DecalGridComponent, TransformComponent>();
|
||||||
|
|
||||||
|
while (gridQuery.MoveNext(out var decalGrid, out var xform))
|
||||||
{
|
{
|
||||||
|
if (xform.MapID != args.MapId)
|
||||||
|
continue;
|
||||||
|
|
||||||
var zIndexDictionary = decalGrid.DecalRenderIndex;
|
var zIndexDictionary = decalGrid.DecalRenderIndex;
|
||||||
|
|
||||||
if (zIndexDictionary.Count == 0)
|
if (zIndexDictionary.Count == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (xform.MapID != args.MapId)
|
var (_, worldRot, worldMatrix) = xformSystem.GetWorldPositionRotationMatrix(xform);
|
||||||
continue;
|
|
||||||
|
|
||||||
var (_, worldRot, worldMatrix) = xformSystem.GetWorldPositionRotationMatrix(xform, xformQuery);
|
|
||||||
|
|
||||||
handle.SetTransform(worldMatrix);
|
handle.SetTransform(worldMatrix);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user