mirror of
https://github.com/ppy/osu
synced 2024-12-28 18:02:53 +00:00
Fetch lastlast object from beatmap, not objects list
This commit is contained in:
parent
6d2a2ba7d6
commit
e7602563fb
@ -92,7 +92,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
// The first jump is formed by the first two hitobjects of the map.
|
||||
// If the map has less than two OsuHitObjects, the enumerator will not return anything.
|
||||
for (int i = 1; i < beatmap.HitObjects.Count; i++)
|
||||
objects.Add(new OsuDifficultyHitObject(beatmap.HitObjects[i], beatmap.HitObjects[i - 1], clockRate, objects, objects.Count));
|
||||
{
|
||||
var lastLast = i > 1 ? beatmap.HitObjects[i - 2] : null;
|
||||
objects.Add(new OsuDifficultyHitObject(beatmap.HitObjects[i], beatmap.HitObjects[i - 1], lastLast, clockRate, objects, objects.Count));
|
||||
}
|
||||
|
||||
return objects;
|
||||
}
|
||||
|
@ -75,10 +75,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
||||
private readonly OsuHitObject lastLastObject;
|
||||
private readonly OsuHitObject lastObject;
|
||||
|
||||
public OsuDifficultyHitObject(HitObject hitObject, HitObject lastObject, double clockRate, List<DifficultyHitObject> objects, int index)
|
||||
public OsuDifficultyHitObject(HitObject hitObject, HitObject lastObject, HitObject lastLastObject, double clockRate, List<DifficultyHitObject> objects, int index)
|
||||
: base(hitObject, lastObject, clockRate, objects, index)
|
||||
{
|
||||
lastLastObject = (OsuHitObject)Previous(1)?.BaseObject;
|
||||
this.lastLastObject = (OsuHitObject)lastLastObject;
|
||||
this.lastObject = (OsuHitObject)lastObject;
|
||||
|
||||
// Capped to 25ms to prevent difficulty calculation breaking from simultaneous objects.
|
||||
|
Loading…
Reference in New Issue
Block a user