ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
14.64k stars 2.16k forks source link

Catch's replays has different key count from gameplay #28350

Open cdwcgt opened 1 month ago

cdwcgt commented 1 month ago

Type

Game behaviour

Bug description

from my video playback image

from replay playback (2024.521.2) image

Obviously, the replay's key count has increased abnormally. combo 112x 0:17, key 1 was quickly press twice.

cdwcgt playing nano - Bull_s Eye (TV Size) (Ascendance) [Secre_s Overdose] (2024-05-28_01-02).zip https://osu.ppy.sh/scores/2899441062

Here are the results of my own research:

cause this problem is because there was one time that was recorded twice,

https://github.com/ppy/osu/blob/0a7336ef17b63f5c20d53d196add3a4c4be75d9e/osu.Game.Rulesets.Catch/Replays/CatchReplayFrame.cs#L49-L56

due to two frames are in a same time and a same position, so FromLegacy will not add action to the first frame in the same time.

This can be proved by filter frames with the same time

diff --git a/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs b/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs
index ba1fdd6adf..3d318d59fb 100644
--- a/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs
+++ b/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs
@@ -320,7 +320,7 @@ private void readLegacyReplay(Replay replay, StreamReader reader)
                 // this handles frames with negative delta.
                 // this doesn't match stable 100% as stable will do something similar to adding an interpolated "intermediate frame"
                 // at the point wherein time flow changes from backwards to forwards, but it'll do for now.
-                if (currentFrame != null && legacyFrame.Time < currentFrame.Time)
+                if (currentFrame != null && legacyFrame.Time <= currentFrame.Time)
                     continue;

                 replay.Frames.Add(currentFrame = convertFrame(legacyFrame, currentFrame));

from this patch image

Screenshots or videos

No response

Version

2024.521.2

Logs

no

bdach commented 1 month ago

Will need to cross-check how stable treats frames with zero elapsed time before passing judgement here but for the record I don't consider prior lazer behaviour to be significant if it doesn't match stable.

If that check mentioned in that patch above currently matches stable on master then to me this is a won't-fix.

cdwcgt commented 1 month ago

If that check mentioned in that patch above currently matches stable on master then to me this is a won't-fix.

I don't think my patch is a solution. As I said, it just proved that the problem was caused by the zero elapsed time.

my patch can't tell which of the two frames is important. As my screenshot, it lost a K3 press (dash which record directly in replay), it may dropped by my patch.