mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
Increase density by not skipping objects
This commit is contained in:
parent
e1ed8554a1
commit
d157c42340
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
@ -43,13 +44,22 @@ namespace osu.Game.Rulesets.Mania.Mods
|
|||||||
}))
|
}))
|
||||||
.OrderBy(h => h.startTime).ToList();
|
.OrderBy(h => h.startTime).ToList();
|
||||||
|
|
||||||
for (int i = 0; i < locations.Count - 1; i += 2)
|
for (int i = 0; i < locations.Count - 1; i++)
|
||||||
{
|
{
|
||||||
|
// Full duration of the hold note.
|
||||||
|
double duration = locations[i + 1].startTime - locations[i].startTime;
|
||||||
|
|
||||||
|
// Beat length at the end of the hold note.
|
||||||
|
double beatLength = beatmap.ControlPointInfo.TimingPointAt(locations[i + 1].startTime).BeatLength;
|
||||||
|
|
||||||
|
// Decrease the duration by at most a 1/4 beat to ensure there's no instantaneous notes.
|
||||||
|
duration = Math.Max(duration / 2, duration - beatLength / 4);
|
||||||
|
|
||||||
newColumnObjects.Add(new HoldNote
|
newColumnObjects.Add(new HoldNote
|
||||||
{
|
{
|
||||||
Column = column.Key,
|
Column = column.Key,
|
||||||
StartTime = locations[i].startTime,
|
StartTime = locations[i].startTime,
|
||||||
Duration = locations[i + 1].startTime - locations[i].startTime,
|
Duration = duration,
|
||||||
Samples = locations[i].samples,
|
Samples = locations[i].samples,
|
||||||
NodeSamples = new List<IList<HitSampleInfo>>
|
NodeSamples = new List<IList<HitSampleInfo>>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user