fix(replay): 进入回放前先退出当前世界或服务器 - #187
Merged
Merged
Conversation
loadWorld(replayWorld) 不会断开原连接,旁观飞行仍会发到真实服务器。 进入回放时先按 Disconnect 路径退出现世/服务器,再加载回放世界。 Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
在世界或服务器里点播放时,回放世界会直接
loadWorld(replayWorld),不会走 Disconnect 路径。1.8.9 的loadWorld(新世界)不会cleanup()旧NetHandlerPlayClient,也不会关 integrated server,旧NetworkManager继续开着。旁观飞行仍按原thePlayer.sendQueue发到真实服务器,表现为飞行等异常。改动
ReplayPlayer.openWorld在搭 SilentConnection / 回放WorldClient之前先leaveCurrentSession():QUIT_NETWORK相同的sendQuittingDisconnectingPacket()loadWorld(null),关掉连接并停掉 integrated serverReplayScreen保持到回放世界就绪后displayGuiScreen(null)sendQueue缺失时只记 warn,仍继续loadWorld(null)。Seek / 重开已有回放时
start()会先stop()卸掉回放世界,此时theWorld已是 null,leaveCurrentSession是空操作。验证
./gradlew test覆盖现有单元测试范围
只改 Edge 回放进入路径。Nova 同问题另开 PR。