diff --git a/src/k_rank.cpp b/src/k_rank.cpp index b22197f17..89cae5e16 100644 --- a/src/k_rank.cpp +++ b/src/k_rank.cpp @@ -383,7 +383,7 @@ void gpRank_t::Rejigger(UINT16 removedmap, UINT16 removedgt, UINT16 addedmap, UI totalPoints = 0; } - INT32 deltaLaps = 0; + INT32 deltaExp = 0; INT32 deltaPrisons = 0; INT32 deltaRings = 0; @@ -392,12 +392,7 @@ void gpRank_t::Rejigger(UINT16 removedmap, UINT16 removedgt, UINT16 addedmap, UI { if (removedgt == GT_RACE) { - // AGH CAN'T USE, gametype already possibly not GT_RACE... - //deltaLaps -= K_RaceLapCount(removedmap); - if (cv_numlaps.value == -1) - deltaLaps -= mapheaderinfo[removedmap]->numlaps; - else - deltaLaps -= cv_numlaps.value; + deltaExp -= TARGETEXP; } if ((gametypes[removedgt]->rules & GTR_SPHERES) == 0) { @@ -414,7 +409,7 @@ void gpRank_t::Rejigger(UINT16 removedmap, UINT16 removedgt, UINT16 addedmap, UI { if (addedgt == GT_RACE) { - deltaLaps += K_RaceLapCount(addedmap); + deltaExp += TARGETEXP; } if ((gametypes[addedgt]->rules & GTR_SPHERES) == 0) { @@ -426,26 +421,13 @@ void gpRank_t::Rejigger(UINT16 removedmap, UINT16 removedgt, UINT16 addedmap, UI } } - if (deltaLaps) + if (deltaExp) { - INT32 workingTotalExp = totalExp; - - // +1, since 1st place laps are worth 2 pts. - for (i = 0; i < numPlayers+1; i++) - { - workingTotalExp += deltaLaps; - } - - if (workingTotalExp > 0) - totalExp = workingTotalExp; + deltaExp += totalExp; + if (deltaExp > 0) + totalExp = deltaExp; else totalExp = 0; - - deltaLaps += exp; - if (deltaLaps > 0) - exp = deltaLaps; - else - exp = 0; } if (deltaPrisons) diff --git a/src/k_tally.cpp b/src/k_tally.cpp index b35969722..eb4ef1f0e 100644 --- a/src/k_tally.cpp +++ b/src/k_tally.cpp @@ -95,7 +95,7 @@ void level_tally_t::DetermineBonuses(void) if (totalExp > 0) { // Give circuit gamemodes a consolation bonus - // for getting good placements on each lap. + // for getting good placements on each grading point. temp_bonuses.push_back(TALLY_BONUS_EXP); } @@ -244,7 +244,7 @@ INT32 level_tally_t::CalculateGrade(void) { // Use a special curve for this. // Low Exp amounts are guaranteed, higher than half is where skill expression starts - // Magic numbers here are to reduce the range from 50-125 to 0-75 and compare with a max of 58, 85% of which is 49.3, which should put an even 100 or higher displayexp at A rank + // Magic numbers here are to reduce the range from 50-125 to 0-75 and compare with a max of 58, 85% of which is 49.3, which should put an even 100 or higher exp at A rank const fixed_t frac = std::min(FRACUNIT, ((exp-50) * FRACUNIT) / std::max(1, static_cast(totalExp-42))); ours += Easing_Linear(frac, 0, bonusWeights[i]); break;