From f9b1bdf2bc0edb2bc83df0c7ed99d1c820b92601 Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 30 May 2023 00:41:28 +0100 Subject: [PATCH] K_CalculateGPGrade: Do not penalise for a cup that has no Prisons/Laps at all, so Sealed Star can be reached with numlaps 0/custom Cup with no battle levels --- src/k_rank.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k_rank.c b/src/k_rank.c index ec69c78c8..61c5a49c6 100644 --- a/src/k_rank.c +++ b/src/k_rank.c @@ -360,8 +360,8 @@ gp_rank_e K_CalculateGPGrade(gpRank_t *rankData) const INT32 positionWeight = 150; const INT32 pointsWeight = 100; - const INT32 lapsWeight = 100; - const INT32 prisonsWeight = 100; + const INT32 lapsWeight = (rankData->totalLaps > 0) ? 100 : 0; + const INT32 prisonsWeight = (rankData->totalPrisons > 0) ? 100 : 0; const INT32 ringsWeight = 50; const INT32 total = positionWeight + pointsWeight + lapsWeight + prisonsWeight + ringsWeight; const INT32 continuesPenalty = 20;