Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
What does "changing their inventory just before switching" mean exactly? How much time between sending an inventory packet and switching are we talking? Most players would need to open chat (and thus stop what they are doing) and type out the command to switch. In that time period I wouldn't expect any inventory changes other than incidental item pickups, so is there a particular scenario that you are trying to solve that can be tested against? Perhaps a player has reported something or you noticed something in your set-up? |
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.
Testing the same setup as popstarfreas/Dimensions-TerrariaServer#5, something done right before switching was sometimes missing in the next world. The switch destroys the connection to the previous world right away, so whatever it hadn't read yet is dropped, and with bots changing their inventory just before switching about 3.5% of those changes were lost.
This ends the connection first and destroys it 300ms later, like
disconnectalready does with the client, so the previous world reads what it was sent before noticing the leave. What that world sends meanwhile isn't passed on to the client anymore. The loss went down to about 0.6%, and switching takes those 300ms longer.It was only tested with bots, so it still needs testing with real players.
🤖 Generated with Claude Code