Skip to content

Commit

Permalink
Merge pull request ppy#24528 from bdach/fix-dual-stages-skinnable-layer
Browse files Browse the repository at this point in the history
Fix playfield skinnable layer bounds being incorrectly calculated with multiple stages
  • Loading branch information
peppy authored Aug 15, 2023
2 parents 01eceea + 3178865 commit 31c31a9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public override Quad SkinnableComponentScreenSpaceDrawQuad
{
get
{
if (Stages.Count == 1)
return Stages.First().ScreenSpaceDrawQuad;
RectangleF totalArea = RectangleF.Empty;

RectangleF area = RectangleF.Empty;

foreach (var stage in Stages)
area = RectangleF.Union(area, stage.ScreenSpaceDrawQuad.AABBFloat);
for (int i = 0; i < Stages.Count; ++i)
{
var stageArea = Stages[i].ScreenSpaceDrawQuad.AABBFloat;
totalArea = i == 0 ? stageArea : RectangleF.Union(totalArea, stageArea);
}

return area;
return totalArea;
}
}

Expand Down

0 comments on commit 31c31a9

Please sign in to comment.