1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

fix(osu.Game): bars in hit distribution graph stretching in the opposite direction when DrawHeight is less than DrawWidth

This commit is contained in:
Acid Chicken (硫酸鶏) 2022-09-12 16:20:33 +09:00
parent 96951057df
commit 0d0e2e7bcc
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99

View File

@ -323,7 +323,7 @@ namespace osu.Game.Screens.Ranking.Statistics
private void updateBasalHeight()
{
float newBasalHeight = DrawHeight == 0 ? 0 : DrawWidth / DrawHeight;
float newBasalHeight = DrawHeight > DrawWidth ? DrawWidth / DrawHeight : 1;
if (newBasalHeight == basalHeight)
return;
@ -353,7 +353,7 @@ namespace osu.Game.Screens.Ranking.Statistics
for (int i = 0; i < values.Count; i++)
{
boxOriginals[i].Y = offsetForValue(offsetValue) * BoundingBox.Height;
boxOriginals[i].Y = offsetForValue(offsetValue) * DrawHeight;
boxOriginals[i].Height = heightForValue(values[i].Value);
offsetValue -= values[i].Value;
}