mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix rejigger
exp is simpler than lappoints
This commit is contained in:
parent
50fd04bdb1
commit
3d11c142cc
2 changed files with 9 additions and 27 deletions
|
|
@ -383,7 +383,7 @@ void gpRank_t::Rejigger(UINT16 removedmap, UINT16 removedgt, UINT16 addedmap, UI
|
||||||
totalPoints = 0;
|
totalPoints = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 deltaLaps = 0;
|
INT32 deltaExp = 0;
|
||||||
INT32 deltaPrisons = 0;
|
INT32 deltaPrisons = 0;
|
||||||
INT32 deltaRings = 0;
|
INT32 deltaRings = 0;
|
||||||
|
|
||||||
|
|
@ -392,12 +392,7 @@ void gpRank_t::Rejigger(UINT16 removedmap, UINT16 removedgt, UINT16 addedmap, UI
|
||||||
{
|
{
|
||||||
if (removedgt == GT_RACE)
|
if (removedgt == GT_RACE)
|
||||||
{
|
{
|
||||||
// AGH CAN'T USE, gametype already possibly not GT_RACE...
|
deltaExp -= TARGETEXP;
|
||||||
//deltaLaps -= K_RaceLapCount(removedmap);
|
|
||||||
if (cv_numlaps.value == -1)
|
|
||||||
deltaLaps -= mapheaderinfo[removedmap]->numlaps;
|
|
||||||
else
|
|
||||||
deltaLaps -= cv_numlaps.value;
|
|
||||||
}
|
}
|
||||||
if ((gametypes[removedgt]->rules & GTR_SPHERES) == 0)
|
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)
|
if (addedgt == GT_RACE)
|
||||||
{
|
{
|
||||||
deltaLaps += K_RaceLapCount(addedmap);
|
deltaExp += TARGETEXP;
|
||||||
}
|
}
|
||||||
if ((gametypes[addedgt]->rules & GTR_SPHERES) == 0)
|
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;
|
deltaExp += totalExp;
|
||||||
|
if (deltaExp > 0)
|
||||||
// +1, since 1st place laps are worth 2 pts.
|
totalExp = deltaExp;
|
||||||
for (i = 0; i < numPlayers+1; i++)
|
|
||||||
{
|
|
||||||
workingTotalExp += deltaLaps;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (workingTotalExp > 0)
|
|
||||||
totalExp = workingTotalExp;
|
|
||||||
else
|
else
|
||||||
totalExp = 0;
|
totalExp = 0;
|
||||||
|
|
||||||
deltaLaps += exp;
|
|
||||||
if (deltaLaps > 0)
|
|
||||||
exp = deltaLaps;
|
|
||||||
else
|
|
||||||
exp = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deltaPrisons)
|
if (deltaPrisons)
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ void level_tally_t::DetermineBonuses(void)
|
||||||
if (totalExp > 0)
|
if (totalExp > 0)
|
||||||
{
|
{
|
||||||
// Give circuit gamemodes a consolation bonus
|
// 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);
|
temp_bonuses.push_back(TALLY_BONUS_EXP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -244,7 +244,7 @@ INT32 level_tally_t::CalculateGrade(void)
|
||||||
{
|
{
|
||||||
// Use a special curve for this.
|
// Use a special curve for this.
|
||||||
// Low Exp amounts are guaranteed, higher than half is where skill expression starts
|
// 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<int>(totalExp-42)));
|
const fixed_t frac = std::min(FRACUNIT, ((exp-50) * FRACUNIT) / std::max(1, static_cast<int>(totalExp-42)));
|
||||||
ours += Easing_Linear(frac, 0, bonusWeights[i]);
|
ours += Easing_Linear(frac, 0, bonusWeights[i]);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue