1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 02:52:54 +08:00

only ignore the first negative frame among the first 3 replay frames

This commit is contained in:
Liam DeVoe 2023-07-27 21:12:08 -04:00
parent 7d174dd8bb
commit 04ef04b902

View File

@ -267,6 +267,7 @@ namespace osu.Game.Scoring.Legacy
private void readLegacyReplay(Replay replay, StreamReader reader)
{
float lastTime = beatmapOffset;
bool negativeFrameEncounted = false;
ReplayFrame currentFrame = null;
// the negative time amount that must be "paid back" by positive frames before we start including frames again.
@ -308,15 +309,19 @@ namespace osu.Game.Scoring.Legacy
// negative time roughly equal to SkipBoundary. This shouldn't be counted towards the deficit, otherwise
// any replay data before the skip would be, well, skipped.
//
// On testing against stable it appears that stable ignores the negative time of *any* of the first
// three frames, regardless of if the skip frames are present. Hence the condition here.
// But this may be incorrect and need to be revisited later.
if (i > 2)
// On testing against stable, it appears that stable ignores the negative time of only the first
// negative frame of the first three replay frames, regardless of if the skip frames are present.
// Hence the condition here.
// But there is a possibility this is incorrect and may need to be revisited later.
if (i > 2 || negativeFrameEncounted)
{
timeDeficit += diff;
timeDeficit = Math.Min(0, timeDeficit);
}
if (diff < 0)
negativeFrameEncounted = true;
// still paying back the deficit from a negative frame. Skip this frame.
if (timeDeficit < 0)
continue;