-
Notifications
You must be signed in to change notification settings - Fork 56
[F] #134中引入了一个副作用,错误的使得keepNoteSpeed不再跨歌曲保存了。
#135
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
在当前修改中,为了实现跨歌曲(Track)保存“保持流速”的选项,移除了
GameProcessPostRelease和GameProcessPostStart中的keepNoteSpeed = false;。这确实达到了预期的效果。然而,由于
keepNoteSpeed是一个静态变量(public static bool keepNoteSpeed),如果完全不进行重置,该状态将会一直保留在内存中。在街机环境下,这会导致跨玩家(Credit)的状态泄露——前一个玩家开启了“保持流速”后离开,下一个玩家开始游玩时该选项默认仍会是开启状态,这可能会影响其他玩家的正常游玩体验。为了避免这种跨会话的污染,建议在游戏返回到招揽/示教界面(即
AdvDemoProcess启动,代表当前玩家会话已完全结束)时,将keepNoteSpeed重置为false。你可以在文件后半部分的
AdvDemoProcessOnStart方法中加上重置逻辑:Uh oh!
There was an error while loading. Please reload this page.
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.
我是觉得这个不重要,反正只是个练习功能;在不开启练习模式,speed=1的情况下,keepNoteSpeed没有任何作用。
而且这个原来也是这样的。我只是保证了我 #134 前后,在默认状态下行为不要有任何改变,而已