From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 23 Nov 2023 13:35:49 +0000 (+1100) Subject: Minor decal change (#21860) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=0c4e2650dd0b5b75e419e2f987f3450359c3dad5;p=space-station-14.git Minor decal change (#21860) --- diff --git a/Content.Client/Decals/Overlays/DecalOverlay.cs b/Content.Client/Decals/Overlays/DecalOverlay.cs index f2c11e2a68..6fcd48264b 100644 --- a/Content.Client/Decals/Overlays/DecalOverlay.cs +++ b/Content.Client/Decals/Overlays/DecalOverlay.cs @@ -30,21 +30,22 @@ namespace Content.Client.Decals.Overlays { // Shouldn't need to clear cached textures unless the prototypes get reloaded. var handle = args.WorldHandle; - var xformQuery = _entManager.GetEntityQuery(); var xformSystem = _entManager.System(); var eyeAngle = args.Viewport.Eye?.Rotation ?? Angle.Zero; - foreach (var (decalGrid, xform) in _entManager.EntityQuery(true)) + var gridQuery = _entManager.AllEntityQueryEnumerator(); + + while (gridQuery.MoveNext(out var decalGrid, out var xform)) { + if (xform.MapID != args.MapId) + continue; + var zIndexDictionary = decalGrid.DecalRenderIndex; if (zIndexDictionary.Count == 0) continue; - if (xform.MapID != args.MapId) - continue; - - var (_, worldRot, worldMatrix) = xformSystem.GetWorldPositionRotationMatrix(xform, xformQuery); + var (_, worldRot, worldMatrix) = xformSystem.GetWorldPositionRotationMatrix(xform); handle.SetTransform(worldMatrix);