1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

Finish up DistanceObjectConversion.

This commit is contained in:
smoogipooo 2017-05-18 12:39:37 +09:00
parent 22128f158c
commit e9275138e1

View File

@ -338,7 +338,37 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
// Create the hold note // Create the hold note
add(newRow, holdColumn, startTime, separationTime * repeatCount); add(newRow, holdColumn, startTime, separationTime * repeatCount);
// Todo: Complete int noteCount = 0;
if (conversionDifficulty > 6.5)
noteCount = GetRandomNoteCount(0.63, 0);
else if (conversionDifficulty > 4)
noteCount = GetRandomNoteCount(AvailableColumns < 6 ? 0.12 : 0.45, 0);
else if (conversionDifficulty > 2.5)
noteCount = GetRandomNoteCount(AvailableColumns < 6 ? 0 : 0.24, 0);
noteCount = Math.Min(AvailableColumns - 1, noteCount);
bool ignoreHead = !sampleInfoListAt(startTime, separationTime).Any(s => s.Name == SampleInfo.HIT_WHISTLE || s.Name == SampleInfo.HIT_FINISH || s.Name == SampleInfo.HIT_CLAP);
int nextColumn = Random.Next(RandomStart, AvailableColumns);
var tempRow = new ObjectRow();
for (int i = 0; i <= repeatCount; i++)
{
if (!(ignoreHead && startTime == originalObject.StartTime))
{
for (int j = 0; j < noteCount; j++)
{
while (tempRow.IsTaken(nextColumn) || nextColumn == holdColumn)
nextColumn = Random.Next(RandomStart, AvailableColumns);
add(tempRow, nextColumn, startTime, startTime, noteCount + 1);
}
}
foreach (ManiaHitObject obj in tempRow.HitObjects)
newRow.Add(obj);
tempRow.Clear();
startTime += separationTime;
}
return newRow; return newRow;
} }