Fix odd low player count servers

Has been killing me ever since it got into master. When vote count changes, one of the votes won't be sliding back and forth across the entire screen.
This commit is contained in:
Sally Coolatta 2023-11-22 20:14:01 -05:00
parent 770293e04c
commit 5207af40b1

View file

@ -301,12 +301,14 @@ static void Y_SortPile(void)
if (votesLeft > rowSize) if (votesLeft > rowSize)
{ {
SINT8 topRowIndex = (rowSize - ((votesLeft - 1) % rowSize)) - 1;
if (odd == true) if (odd == true)
{ {
rowSize--; rowSize--;
topRowIndex--;
} }
const SINT8 topRowIndex = (rowSize - ((votesLeft - 1) % rowSize)) - 1;
xOffset = -(rowSize - 1) + (topRowIndex << 1); xOffset = -(rowSize - 1) + (topRowIndex << 1);
pile->destY -= PILE_SPACING_H >> 1; pile->destY -= PILE_SPACING_H >> 1;