mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-23 22:11:01 +00:00
Merge branch 'nerf-rank' into 'master'
Nerf per-level rank requirements See merge request KartKrew/Kart!1648
This commit is contained in:
commit
b8c18ce39f
2 changed files with 12 additions and 8 deletions
|
|
@ -408,14 +408,14 @@ void gpRank_t::Update(void)
|
|||
|
||||
for (i = 0; i < numPlayers; i++)
|
||||
{
|
||||
if (playeringame[displayplayers[i]] == false
|
||||
|| players[displayplayers[i]].spectator == true
|
||||
|| players[displayplayers[i]].bot == true)
|
||||
if (playeringame[g_localplayers[i]] == false
|
||||
|| players[g_localplayers[i]].spectator == true
|
||||
|| players[g_localplayers[i]].bot == true)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const player_t *player = &players[displayplayers[i]]; // TODO: needs looked at for online GP
|
||||
const player_t *player = &players[g_localplayers[i]];
|
||||
gpRank_level_perplayer_t *const dta = &lvl->perPlayer[i];
|
||||
|
||||
if (player->realtime < lvl->time)
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ INT32 level_tally_t::CalculateGrade(void)
|
|||
}
|
||||
case TALLY_BONUS_SCORE:
|
||||
{
|
||||
bonusWeights[i] = 100;
|
||||
bonusWeights[i] = ((pointLimit != 0) ? 100 : 0);
|
||||
break;
|
||||
}
|
||||
case TALLY_BONUS_LAP:
|
||||
|
|
@ -215,7 +215,7 @@ INT32 level_tally_t::CalculateGrade(void)
|
|||
}
|
||||
}
|
||||
|
||||
const INT32 positionWeight = (position > 0 && numPlayers > 2) ? 100 : 0;
|
||||
const INT32 positionWeight = (position > 0 && numPlayers > 2) ? 50 : 0;
|
||||
const INT32 total = positionWeight + bonusWeights[0] + bonusWeights[1];
|
||||
|
||||
INT32 ours = 0;
|
||||
|
|
@ -224,7 +224,7 @@ INT32 level_tally_t::CalculateGrade(void)
|
|||
if (position > 0 && numPlayers > 2)
|
||||
{
|
||||
const INT32 sc = (position - 1);
|
||||
const INT32 loser = ((numPlayers + 1) / 2) - 1; // number of winner positions
|
||||
const INT32 loser = ((numPlayers + 1) / 2); // number of winner positions
|
||||
ours += ((loser - sc) * positionWeight) / loser;
|
||||
}
|
||||
|
||||
|
|
@ -239,7 +239,11 @@ INT32 level_tally_t::CalculateGrade(void)
|
|||
}
|
||||
case TALLY_BONUS_LAP:
|
||||
{
|
||||
ours += (laps * bonusWeights[i]) / std::max(1, static_cast<int>(totalLaps));
|
||||
// Use a special curve for this.
|
||||
// The difference between 0 and 1 lap points is an important difference in skill,
|
||||
// while the difference between 5 and 6 is not very notable.
|
||||
const fixed_t frac = (laps * FRACUNIT) / std::max(1, static_cast<int>(totalLaps));
|
||||
ours += Easing_OutSine(frac, 0, bonusWeights[i]);
|
||||
break;
|
||||
}
|
||||
case TALLY_BONUS_PRISON:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue