-
Notifications
You must be signed in to change notification settings - Fork 118
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 Infinite Loading Screen + Fix Modsettings "int" functionality #651
Conversation
Maybe open a dialog when returning to the main menu that tells the user that the loading has timed out |
My main concern would be what if the loading actually takes more than 30 seconds? Please also comment your code, scripts are already chaotic the way they are right now |
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 think 30 seconds before a timeout is fine
Added the comments and uni's suggestions, also added a loop to reduce the chance of a false positive from loading multiple times |
is there a point in aborting the function early? I'd just keep the |
there are various signals that might be of use (all of which are called on
i think |
|
couldnt we get rid of the "if" statement if that signal ends the script Edit: (nevermind 1 other script can change the bool) |
endsignal causes the script to not work @uniboi , it will print that it is attempting to send the player back to lobby "TimeoutHandler disconnected because loading took too long" but it won't Is there any other known way to end the script, or should we go back to the for loop |
Try changing the function to this:
|
I have no idea what you did there @uniboi |
The current code still works but likely isn't the most optimal, if anyone has an alternative that doesn't use EndSignal (which seems to be causing issues) let me know |
I'll take a look tomorrow |
Make sure to click the |
@uniboi bump |
Added ConVar and per Spoon's request added it to modsettings This also adds a Northstar.Client section to modsettings This PR now fixes an issue where modsettings cannot take an "int" ConVarPut both of these in PR description as well |
Changed it from an int to a float |
Co-authored-by: Jack <[email protected]>
Co-authored-by: Jack <[email protected]>
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.
Just a few more things from me
Co-authored-by: Jack <[email protected]>
Co-authored-by: Jack <[email protected]>
Co-authored-by: Jack <[email protected]>
Co-authored-by: Jack <[email protected]>
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.
Code looks good :)
I got an odd error while playing with this and I think its related |
I believe its fixed with an "IsConnected()" check I just added, works fine in testing |
Also this fix works if the masterserver was to go down while someone was loading for some reason |
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.
Blocking as:
- Each fix should be a separate PR
- The "fix" for infinite loading screen is really hacky and should be handled in native by checking the connection like valve source does.
Previously if a server crashed while the client was in the map loading screen, all clients would be stuck in an infinite loading screen. (This was reproduced by multiple people)
This boots clients back to the menu if the game hasn't loaded within 30 seconds (server crash) and loads the main menu, it doesn't affect the campaign's "continue" feature either.
Video below (some footage sped up by 8x to reduce video size)
Loading.Screen.Fix.mp4
EDIT:
This adds a Northstar.Client section to modsettings
This also fixes an issue where modsettings cannot take an "int" ConVar
Closes: R2Northstar/Northstar#489