Skip to content

Commit e3b83e0

Browse files
committed
Add snap/flow perf attributes
1 parent 5df984c commit e3b83e0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceAttributes.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ public class OsuPerformanceAttributes : PerformanceAttributes
4242
[JsonProperty("speed_estimated_slider_breaks")]
4343
public double SpeedEstimatedSliderBreaks { get; set; }
4444

45+
[JsonProperty("snap")]
46+
public double Snap { get; set; }
47+
48+
[JsonProperty("flow")]
49+
public double Flow { get; set; }
50+
4551
public override IEnumerable<PerformanceDisplayAttribute> GetAttributesForDisplay()
4652
{
4753
foreach (var attribute in base.GetAttributesForDisplay())

osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
165165
AimEstimatedSliderBreaks = aimEstimatedSliderBreaks,
166166
SpeedEstimatedSliderBreaks = speedEstimatedSliderBreaks,
167167
SpeedDeviation = speedDeviation,
168+
Snap = aimValue * Math.Pow(osuAttributes.SnapAimDifficulty / Math.Max(osuAttributes.AimDifficulty, 0.01), 3),
169+
Flow = aimValue * Math.Pow(osuAttributes.FlowAimDifficulty / Math.Max(osuAttributes.AimDifficulty, 0.01), 3),
168170
Total = totalValue
169171
};
170172
}

0 commit comments

Comments
 (0)