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

Cancel beatmap load in more loops #32192

Merged
merged 3 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions osu.Game/Rulesets/Objects/HitObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ public IList<HitSampleInfo> Samples
/// <param name="cancellationToken">The cancellation token.</param>
public void ApplyDefaults(ControlPointInfo controlPointInfo, IBeatmapDifficultyInfo difficulty, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();

ApplyDefaultsToSelf(controlPointInfo, difficulty);

nestedHitObjects.Clear();
Expand All @@ -114,6 +116,8 @@ public void ApplyDefaults(ControlPointInfo controlPointInfo, IBeatmapDifficultyI
{
foreach (HitObject hitObject in nestedHitObjects)
{
cancellationToken.ThrowIfCancellationRequested();

if (hitObject is IHasComboInformation n)
{
n.ComboIndexBindable.BindTo(hasCombo.ComboIndexBindable);
Expand Down
2 changes: 2 additions & 0 deletions osu.Game/Rulesets/Objects/SliderEventGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public static IEnumerable<SliderEventDescriptor> Generate(double startTime, doub

for (int span = 0; span < spanCount; span++)
{
cancellationToken.ThrowIfCancellationRequested();

double spanStartTime = startTime + span * spanDuration;
bool reversed = span % 2 == 1;

Expand Down
Loading