1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-19 04:17:27 +08:00

Merge pull request #10179 from smoogipoo/fix-spinner-nested-objects

This commit is contained in:
Dean Herbert 2020-09-17 17:47:48 +09:00 committed by GitHub
commit ffa02a2836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Threading;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Judgements;
@ -48,14 +49,16 @@ namespace osu.Game.Rulesets.Osu.Objects
MaximumBonusSpins = (int)((maximum_rotations_per_second - minimumRotationsPerSecond) * secondsDuration);
}
protected override void CreateNestedHitObjects()
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
{
base.CreateNestedHitObjects();
base.CreateNestedHitObjects(cancellationToken);
int totalSpins = MaximumBonusSpins + SpinsRequired;
for (int i = 0; i < totalSpins; i++)
{
cancellationToken.ThrowIfCancellationRequested();
double startTime = StartTime + (float)(i + 1) / totalSpins * Duration;
AddNested(i < SpinsRequired

View File

@ -145,6 +145,7 @@ namespace osu.Game.Rulesets.Objects
#pragma warning restore 618
}
[Obsolete("Use the cancellation-supporting override")] // Can be removed 20210318
protected virtual void CreateNestedHitObjects()
{
}