1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Merge pull request #17976 from frenzibyte/improve-score-grading

Change score accuracy grading logic to be inclusive
This commit is contained in:
Dan Balasescu 2022-04-26 12:06:58 +09:00 committed by GitHub
commit 51b4821efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 13 deletions

View File

@ -375,13 +375,13 @@ namespace osu.Game.Rulesets.Scoring
{ {
if (acc == 1) if (acc == 1)
return ScoreRank.X; return ScoreRank.X;
if (acc > 0.95) if (acc >= 0.95)
return ScoreRank.S; return ScoreRank.S;
if (acc > 0.9) if (acc >= 0.9)
return ScoreRank.A; return ScoreRank.A;
if (acc > 0.8) if (acc >= 0.8)
return ScoreRank.B; return ScoreRank.B;
if (acc > 0.7) if (acc >= 0.7)
return ScoreRank.C; return ScoreRank.C;
return ScoreRank.D; return ScoreRank.D;

View File

@ -212,12 +212,12 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
Padding = new MarginPadding { Vertical = -15, Horizontal = -20 }, Padding = new MarginPadding { Vertical = -15, Horizontal = -20 },
Children = new[] Children = new[]
{ {
new RankBadge(1f, getRank(ScoreRank.X)), new RankBadge(1, getRank(ScoreRank.X)),
new RankBadge(0.95f, getRank(ScoreRank.S)), new RankBadge(0.95, getRank(ScoreRank.S)),
new RankBadge(0.9f, getRank(ScoreRank.A)), new RankBadge(0.9, getRank(ScoreRank.A)),
new RankBadge(0.8f, getRank(ScoreRank.B)), new RankBadge(0.8, getRank(ScoreRank.B)),
new RankBadge(0.7f, getRank(ScoreRank.C)), new RankBadge(0.7, getRank(ScoreRank.C)),
new RankBadge(0.35f, getRank(ScoreRank.D)), new RankBadge(0.35, getRank(ScoreRank.D)),
} }
}, },
rankText = new RankText(score.Rank) rankText = new RankText(score.Rank)

View File

@ -23,7 +23,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
/// <summary> /// <summary>
/// The accuracy value corresponding to the <see cref="ScoreRank"/> displayed by this badge. /// The accuracy value corresponding to the <see cref="ScoreRank"/> displayed by this badge.
/// </summary> /// </summary>
public readonly float Accuracy; public readonly double Accuracy;
private readonly ScoreRank rank; private readonly ScoreRank rank;
@ -35,7 +35,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
/// </summary> /// </summary>
/// <param name="accuracy">The accuracy value corresponding to <paramref name="rank"/>.</param> /// <param name="accuracy">The accuracy value corresponding to <paramref name="rank"/>.</param>
/// <param name="rank">The <see cref="ScoreRank"/> to be displayed in this <see cref="RankBadge"/>.</param> /// <param name="rank">The <see cref="ScoreRank"/> to be displayed in this <see cref="RankBadge"/>.</param>
public RankBadge(float accuracy, ScoreRank rank) public RankBadge(double accuracy, ScoreRank rank)
{ {
Accuracy = accuracy; Accuracy = accuracy;
this.rank = rank; this.rank = rank;
@ -90,7 +90,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
base.Update(); base.Update();
// Starts at -90deg (top) and moves counter-clockwise by the accuracy // Starts at -90deg (top) and moves counter-clockwise by the accuracy
rankContainer.Position = circlePosition(-MathF.PI / 2 - (1 - Accuracy) * MathF.PI * 2); rankContainer.Position = circlePosition(-MathF.PI / 2 - (1 - (float)Accuracy) * MathF.PI * 2);
} }
private Vector2 circlePosition(float t) private Vector2 circlePosition(float t)