mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:52:55 +08:00
Fix incorrect iteration over difficulty sections
This commit is contained in:
parent
bc197a88e1
commit
22f3bee55a
@ -35,18 +35,22 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty
|
||||
new Speed()
|
||||
};
|
||||
|
||||
double sectionEnd = section_length / TimeRate;
|
||||
double sectionLength = section_length * TimeRate;
|
||||
|
||||
// The first object doesn't generate a strain, so we begin with an incremented section end
|
||||
double currentSectionEnd = 2 * sectionLength;
|
||||
|
||||
foreach (OsuDifficultyHitObject h in beatmap)
|
||||
{
|
||||
while (h.BaseObject.StartTime > sectionEnd)
|
||||
while (h.BaseObject.StartTime > currentSectionEnd)
|
||||
{
|
||||
foreach (Skill s in skills)
|
||||
{
|
||||
s.SaveCurrentPeak();
|
||||
s.StartNewSectionFrom(sectionEnd);
|
||||
s.StartNewSectionFrom(currentSectionEnd);
|
||||
}
|
||||
|
||||
sectionEnd += section_length;
|
||||
currentSectionEnd += sectionLength;
|
||||
}
|
||||
|
||||
foreach (Skill s in skills)
|
||||
|
Loading…
Reference in New Issue
Block a user