-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix judgement counter not showing correct counts when spectating user mid-play #29914
Conversation
// This flow is made to handle cases of watching from the middle of a replay / spectating session. | ||
// | ||
// Once we get an initial state, we can rely on `NewJudgement` and `JudgementReverted`, so | ||
// as a preemptive optimisation, only do a full re-sync if we have all-zero counts. | ||
bool hasCounts = false; | ||
|
||
foreach (var r in results) | ||
{ | ||
if (r.Value.ResultCount.Value > 0) | ||
{ | ||
hasCounts = true; | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In testing on production, it appears that this breaks the PR, because it appears that the resets-from-replay-frame occur at the end of a frame bundle, at which point part of gameplay has been replayed and very likely incurred an actual judgement through the expected flows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've applied a simple fix which looks good on paper and seems to work in initial testing. There's a brief period where counts won't be updated (until the first reset event) but I think this is okay.
Closes #29874
Test setup is ugly because the flow is ugly.