mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Actually use the cancellation token
This commit is contained in:
@ -96,7 +96,7 @@ namespace osu.Game.Rulesets.Mania.Objects
|
||||
{
|
||||
base.CreateNestedHitObjects(cancellationToken);
|
||||
|
||||
createTicks();
|
||||
createTicks(cancellationToken);
|
||||
|
||||
AddNested(Head = new Note
|
||||
{
|
||||
@ -113,13 +113,15 @@ namespace osu.Game.Rulesets.Mania.Objects
|
||||
});
|
||||
}
|
||||
|
||||
private void createTicks()
|
||||
private void createTicks(CancellationToken cancellationToken)
|
||||
{
|
||||
if (tickSpacing == 0)
|
||||
return;
|
||||
|
||||
for (double t = StartTime + tickSpacing; t <= EndTime - tickSpacing; t += tickSpacing)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
AddNested(new HoldNoteTick
|
||||
{
|
||||
StartTime = t,
|
||||
|
Reference in New Issue
Block a user