-
Notifications
You must be signed in to change notification settings - Fork 11
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
Reconnect fix #413
Draft
TheGrayAlien
wants to merge
37
commits into
main
Choose a base branch
from
Reconnect_Fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Reconnect fix #413
Conversation
This file contains 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
Tested (once so far) and it worked. Keeping as draft until further test runs.
This should prevent a second HR using player from activating their ruleset if they gain host.
Notify Host with a shorter timed welcome message when ruleset is restored.
Level sequence already loads properly without redefining it. Freezes game otherwise.
Prevents error message when loading ruleset after reconnect.
Fix level sequence not loading on new games since last update.
Piece adjustments get lost if unloaded so keep them activated for possible reconnect. Don't reload them if reconnect as they are already still loaded. If it's not your game and you become host it will deactivate ALL rules.
Set gameId when hitting play again in case of disconnect in next match
Some rules were prevented from loading when new room initialized after a disconnect.
Prevent manual disconnects from being seen as forced disconnects.
Only try to reconnect mod on unintentional disconnects User CoreMod logger for consistency
Just in case
Fully deactivate ruleset if joining a different game Only report disconnects and set _isReconnect if you are hosting and ruleset is active
IDisableOnReconnect Type prevents unload/load of rule on disconnect Added Type to (so far) discovered problematic rules
Skipping (might) not (be) necessary? Will test.
Try skip deactivation and reactivation of non-working rules. Untested. PieceConfig wasn't working so added to IDisableOnReconnect list
Use original game creation room code as reference instead.
Let ruleset load when active if reconnect possible Don't try to reconnect if quitting when game is ended
Variable prevented reconnect after finished game and was unnecessary.
This rule also doesn't work when new players enter if not held in memory after reconnect.
Deactivates only reconnection rules as needed.
Only deactivate active reconnection rules when manually disconnecting.
Amazing work @TheGrayAlien - All of this looks good to me. |
Changes some log warnings to messages and vice versa Consolidate some code
Looked it over and cleaned up some logs and added code speedups. |
Fixes not being able to change rulesets after selecting and playing one
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.
Over the past weeks with this fix implemented I've been disconnected quite a number of times as host. Each time after the players leave the room and I become host again the rulesets have returned to full functionality. Last night during two consecutive games using a ruleset using 33 rules I was disconnected 3 times and regained host without issue every time. I'll put this up as a draft until others can verify/review the code.