-
Notifications
You must be signed in to change notification settings - Fork 116
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
Prevent crash when selecting first infected #731
Prevent crash when selecting first infected #731
Conversation
Crash would be caused by server being empty at the time of selecting infected, right? |
Yes, it tries to get a random number between 0 and 0 (which crashes) |
Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_inf.gnut
Outdated
Show resolved
Hide resolved
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
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.
Confirmed working in testing.
For testing, I ran a server with and without the PR. Then joined the server, started an infection match, and then left before infected was selected.
Without, server would script error. With PR it would simply end match.
closes #625
I chose to end the match early, to avoid the timer ticking down with no players connected.