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

Fix tablist column calculation breaking #1473

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Fix tablist column calculation breaking #1473

merged 1 commit into from
Jan 3, 2025

Conversation

Pablete1234
Copy link
Member

@Pablete1234 Pablete1234 commented Jan 3, 2025

The current logic could break in some scenarios, like a map having 9,1,9 players, means each of the big teams wants "1.8" columns, meaning they each get rounded to 2, plus the small team, makes a total of 5 columns.

I've ditched the logic of each team trying to figure out its size, instead the teams looking at all the other teams in the same row to make the decision.
For 2-team splits, one has to be significantly larger than the other for a 3/1 split, otherwise 2/2 split
For 3-team splits, one has to be bigger than the other two for a 2/1/1 split, otherwise 1/1/1 split (one empty column)
All other cases are trivial (1 team is 4 columns, 4 teams is 1/1/1/1).

Also fixes a long-time nit of mine, if a map has 6 teams before it would split like 1/1/1/1 first row, and 2nd row 1/1 leaving 2 unused columns. Now it would instead do 2/2 in the second row split, as teams look at all the other teams in the same row, instead of overall.

Eg:
image
(in this image, it is assumed that there would be enough obs to fill till that row)

@Pablete1234 Pablete1234 merged commit a6ecd99 into dev Jan 3, 2025
2 checks passed
@Pablete1234 Pablete1234 deleted the tablist-fixes branch January 3, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants