From 6096c9bef409eca1bb4d18f9d1d4ba5c3f063a18 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Wed, 27 Mar 2024 16:58:58 -0400 Subject: [PATCH] Fix K_GetGPPlayerCount off by one --- src/k_grandprix.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/k_grandprix.c b/src/k_grandprix.c index b6f6cb82c..8ac3f7e82 100644 --- a/src/k_grandprix.c +++ b/src/k_grandprix.c @@ -104,15 +104,11 @@ INT16 K_CalculateGPRankPoints(UINT8 position, UINT8 numplayers) --------------------------------------------------*/ UINT8 K_GetGPPlayerCount(UINT8 humans) { - UINT8 playerCount = 8; - - if (humans > 2) - { - // Add 3 bots per player beyond 2P - playerCount += (humans - 2) * 3; - } - - return playerCount; + // 1P -> 8 total + // 2P -> 8 total + // 3P -> 12 total + // 4P -> 16 total + return max(min(humans * 4, MAXPLAYERS), 8); } /*--------------------------------------------------