-
-
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 gameplay skipping forward during resume operation #20014
Conversation
I've took the time to debug through why this is occurring with the refactor and it turns out this is how things are supposed to work w.r.t. pause and resume:
This led to the realisation that So while the solution here is valid, the new behaviour with |
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.
Also there seems to be leftover/debugging changes pushed in this PR.
// Seeking the decoupled clock to its current time ensures that its source clock will be seeked to the same time | ||
// This accounts for the clock source potentially taking time to enter a completely stopped state | ||
Seek(GameplayClock.CurrentTime); |
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.
As per my comment above, this is now pretty much pointless since the clock is always processed regardless of pause state.
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 removed this for now.
c4fd5c8
to
1bff540
Compare
I figured that's how things were, although for whatever reason couldn't find the code in your screenshot. |
If we are going to continue to let the underlying clock process frames, there needs to be a bit of lenience to allow the backwards seek on resume (to play back over the freq ramp period). The test is meant to be ensuring we don't skip the full offset amount, so div10 seems pretty safe.
Closes #19975.
I'm not precisely sure where this regressed in the changes, but it did. Rather than trying to figure out where the issue lies, I've just explicitly added this flow so we are aware of what is going on where and when.
Inline comment should explain this quite well.