Add UnionRectangles extension method.

This commit is contained in:
RoosterDragon
2019-06-14 21:05:50 +01:00
committed by abcdefg30
parent 0e6c37d765
commit 31918e8712
7 changed files with 29 additions and 54 deletions

View File

@@ -324,12 +324,7 @@ namespace OpenRA.Mods.Common.Graphics
if (ShadowStart > 0)
boundSprites = boundSprites.Concat(SpriteBounds(sprites, Frames, ShadowStart, Facings, Length, Stride, transpose));
if (boundSprites.Any())
{
Bounds = boundSprites.First();
foreach (var b in boundSprites.Skip(1))
Bounds = Rectangle.Union(Bounds, b);
}
Bounds = boundSprites.Union();
}
catch (FormatException f)
{