Skip to content
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

Merged
merged 7 commits into from
Jan 4, 2024

Conversation

ASpoonPlaysGames
Copy link
Contributor

closes #625

I chose to end the match early, to avoid the timer ticking down with no players connected.

@ASpoonPlaysGames ASpoonPlaysGames added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Oct 2, 2023
@GeckoEidechse
Copy link
Member

Crash would be caused by server being empty at the time of selecting infected, right?

@ASpoonPlaysGames
Copy link
Contributor Author

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)

Copy link
Contributor

@RoyalBlue1 RoyalBlue1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good

Copy link
Member

@GeckoEidechse GeckoEidechse left a 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.

@GeckoEidechse GeckoEidechse merged commit 4450583 into R2Northstar:main Jan 4, 2024
3 checks passed
@GeckoEidechse GeckoEidechse removed needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Infection crashes when started with zero players
3 participants