Merge branch 'fix-gp-player-count' into 'master'

Fix K_GetGPPlayerCount off by one

See merge request KartKrew/Kart!2179
This commit is contained in:
Oni 2024-03-28 02:07:25 +00:00
commit 1ff6262197

View file

@ -104,15 +104,11 @@ INT16 K_CalculateGPRankPoints(UINT8 position, UINT8 numplayers)
--------------------------------------------------*/ --------------------------------------------------*/
UINT8 K_GetGPPlayerCount(UINT8 humans) UINT8 K_GetGPPlayerCount(UINT8 humans)
{ {
UINT8 playerCount = 8; // 1P -> 8 total
// 2P -> 8 total
if (humans > 2) // 3P -> 12 total
{ // 4P -> 16 total
// Add 3 bots per player beyond 2P return max(min(humans * 4, MAXPLAYERS), 8);
playerCount += (humans - 2) * 3;
}
return playerCount;
} }
/*-------------------------------------------------- /*--------------------------------------------------