mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 10:33:22 +08:00
improve conversion process to reduce breakage in rare cases
This commit is contained in:
parent
d4f29487d3
commit
93e7afd5f3
@ -31,8 +31,8 @@ namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
||||
new Hit { StartTime = 1000, Type = HitType.Centre },
|
||||
new Hit { StartTime = 1500, Type = HitType.Centre },
|
||||
new Hit { StartTime = 2000, Type = HitType.Centre },
|
||||
new Hit { StartTime = 2333, Type = HitType.Centre }, // mod moves this to 2500
|
||||
new Hit { StartTime = 2666, Type = HitType.Rim }, // mod removes this
|
||||
new Hit { StartTime = 2333, Type = HitType.Rim }, // mod removes this
|
||||
new Hit { StartTime = 2666, Type = HitType.Centre }, // mod moves this to 2500
|
||||
new Hit { StartTime = 3000, Type = HitType.Centre },
|
||||
new Hit { StartTime = 3500, Type = HitType.Centre },
|
||||
},
|
||||
@ -71,8 +71,8 @@ namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
||||
new Hit { StartTime = 1000, Type = HitType.Centre },
|
||||
new Hit { StartTime = 1250, Type = HitType.Centre },
|
||||
new Hit { StartTime = 1500, Type = HitType.Centre },
|
||||
new Hit { StartTime = 1666, Type = HitType.Centre }, // mod moves this to 1750
|
||||
new Hit { StartTime = 1833, Type = HitType.Rim }, // mod removes this
|
||||
new Hit { StartTime = 1666, Type = HitType.Rim }, // mod removes this
|
||||
new Hit { StartTime = 1833, Type = HitType.Centre }, // mod moves this to 1750
|
||||
new Hit { StartTime = 2000, Type = HitType.Centre },
|
||||
new Hit { StartTime = 2250, Type = HitType.Centre },
|
||||
},
|
||||
@ -110,7 +110,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Mods
|
||||
new Hit { StartTime = 1000, Type = HitType.Centre },
|
||||
new Hit { StartTime = 1250, Type = HitType.Centre },
|
||||
new Hit { StartTime = 1500, Type = HitType.Centre },
|
||||
new Hit { StartTime = 1625, Type = HitType.Rim }, // mod removes this
|
||||
new Hit { StartTime = 1625, Type = HitType.Rim }, // mod removes this
|
||||
new Hit { StartTime = 1750, Type = HitType.Centre },
|
||||
new Hit { StartTime = 2000, Type = HitType.Centre },
|
||||
},
|
||||
|
@ -95,15 +95,16 @@ namespace osu.Game.Rulesets.Taiko.Mods
|
||||
}
|
||||
else
|
||||
{
|
||||
// 1/6 and 1/3: Adjust the second note and remove the third
|
||||
// 1/6 and 1/3: Remove the second note and adjust the third
|
||||
if (currentHitPosition % 3 == 1)
|
||||
{
|
||||
hits[j].StartTime = hits[j - 1].StartTime + (controlPointInfo.TimingPointAt(hits[j].StartTime).BeatLength / Convert.ToDouble(snapConversion.Value));
|
||||
}
|
||||
else if (currentHitPosition % 3 == 2)
|
||||
{
|
||||
toRemove.Add(hits[j]);
|
||||
}
|
||||
else if (currentHitPosition % 3 == 2 && j < hits.Count - 1)
|
||||
{
|
||||
double offset = controlPointInfo.TimingPointAt(hits[j].StartTime).BeatLength / Convert.ToDouble(snapConversion.Value);
|
||||
hits[j].StartTime = hits[j + 1].StartTime - offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user