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

Use math.ceil instead of math.Round #53

Merged
merged 2 commits into from
Nov 6, 2024
Merged

Conversation

kirillbrest123
Copy link
Contributor

I think that math.ceil handles edge cases like 1-2 players a lot better than math.Round.
For example when there are 2 players you probably don't want the map vote to trigger when just 1 votes to change the map. So you either have to:
a) Set percentage of players who need to RTV to 0.75+
b) Set minimum players to enable RTVing to 3+
Both of these options can be undesirable because:
a) Players are sloths and it can be hard to get 75% to RTV when there are more people on
b) It completely blocks map changing when there are <2 players on the server, which can be frustrating
Also consider that math.ceil behaves exactly the same as if no rounding is done at all, which makes more sense for me

Copy link
Member

@plally plally left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution

@plally plally merged commit 2e9eb66 into CFC-Servers:main Nov 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants