Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include holds when populating slider count #234

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

private readonly bool processConverts;
private readonly bool dryRun;
private readonly List<Ruleset> processableRulesets = new List<Ruleset>();

Check notice on line 27 in osu.Server.DifficultyCalculator/ServerDifficultyCalculator.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Redundant type specification in osu.Server.DifficultyCalculator\ServerDifficultyCalculator.cs on line 27

public ServerDifficultyCalculator(int[]? rulesetIds = null, bool processConverts = true, bool dryRun = false)
{
Expand Down Expand Up @@ -159,7 +159,7 @@
{
if ((obj.LegacyType & LegacyHitObjectType.Circle) > 0)
countCircle++;
if ((obj.LegacyType & LegacyHitObjectType.Slider) > 0)
if ((obj.LegacyType & LegacyHitObjectType.Slider) > 0 || (obj.LegacyType & LegacyHitObjectType.Hold) > 0)
countSlider++;
if ((obj.LegacyType & LegacyHitObjectType.Spinner) > 0)
countSpinner++;
Expand Down Expand Up @@ -203,7 +203,7 @@
private void processLegacyAttributes(ProcessableItem item, MySqlConnection conn)
{
Mod? classicMod = item.Ruleset.CreateMod<ModClassic>();
Mod[] mods = classicMod != null ? new[] { classicMod } : Array.Empty<Mod>();

Check notice on line 206 in osu.Server.DifficultyCalculator/ServerDifficultyCalculator.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Use collection expression in osu.Server.DifficultyCalculator\ServerDifficultyCalculator.cs on line 206

ILegacyScoreSimulator simulator = ((ILegacyRuleset)item.Ruleset).CreateLegacyScoreSimulator();
LegacyScoreAttributes attributes = simulator.Simulate(item.WorkingBeatmap, item.WorkingBeatmap.GetPlayableBeatmap(item.Ruleset.RulesetInfo, mods));
Expand Down
Loading