mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Fix taiko replay frames being mis-ordered
This commit is contained in:
parent
04d4059103
commit
97b4c65554
@ -121,9 +121,7 @@ namespace osu.Game.Rulesets.Taiko.Replays
|
||||
var nextHitObject = GetNextObject(i); // Get the next object that requires pressing the same button
|
||||
|
||||
bool canDelayKeyUp = nextHitObject == null || nextHitObject.StartTime > endTime + KEY_UP_DELAY;
|
||||
|
||||
double calculatedDelay = canDelayKeyUp ? KEY_UP_DELAY : (nextHitObject.StartTime - endTime) * 0.9;
|
||||
|
||||
Frames.Add(new TaikoReplayFrame(endTime + calculatedDelay));
|
||||
|
||||
if (i < Beatmap.HitObjects.Count - 1)
|
||||
@ -138,24 +136,5 @@ namespace osu.Game.Rulesets.Taiko.Replays
|
||||
|
||||
return Replay;
|
||||
}
|
||||
|
||||
protected override HitObject GetNextObject(int currentIndex)
|
||||
{
|
||||
Type desiredType = Beatmap.HitObjects[currentIndex].GetType();
|
||||
|
||||
for (int i = currentIndex + 1; i < Beatmap.HitObjects.Count; i++)
|
||||
{
|
||||
var currentObj = Beatmap.HitObjects[i];
|
||||
|
||||
if (currentObj.GetType() == desiredType ||
|
||||
// Un-press all keys before a DrumRoll or Swell
|
||||
currentObj is DrumRoll || currentObj is Swell)
|
||||
{
|
||||
return Beatmap.HitObjects[i];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user