mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
GP refinements
This commit is contained in:
parent
12bc1b9cca
commit
2459affaa3
5 changed files with 25 additions and 8 deletions
11
src/g_game.c
11
src/g_game.c
|
|
@ -1905,17 +1905,22 @@ void G_Ticker(boolean run)
|
||||||
&& grandprixinfo.gp == true
|
&& grandprixinfo.gp == true
|
||||||
&& grandprixinfo.masterbots == false)
|
&& grandprixinfo.masterbots == false)
|
||||||
{
|
{
|
||||||
UINT8 bot_level_decrease = 3;
|
UINT8 bot_level_decrease = 2;
|
||||||
|
UINT8 min_lvl = 5;
|
||||||
|
|
||||||
if (grandprixinfo.gamespeed == KARTSPEED_EASY)
|
if (grandprixinfo.gamespeed == KARTSPEED_EASY)
|
||||||
{
|
{
|
||||||
bot_level_decrease++;
|
bot_level_decrease++;
|
||||||
|
min_lvl = 1;
|
||||||
}
|
}
|
||||||
else if (grandprixinfo.gamespeed == KARTSPEED_HARD)
|
else if (grandprixinfo.gamespeed == KARTSPEED_HARD)
|
||||||
{
|
{
|
||||||
bot_level_decrease--;
|
bot_level_decrease--;
|
||||||
|
min_lvl = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean already_min_lvl = (players[i].botvars.difficulty >= min_lvl);
|
||||||
|
|
||||||
if (players[i].botvars.difficulty <= bot_level_decrease)
|
if (players[i].botvars.difficulty <= bot_level_decrease)
|
||||||
{
|
{
|
||||||
players[i].botvars.difficulty = 1;
|
players[i].botvars.difficulty = 1;
|
||||||
|
|
@ -1924,6 +1929,9 @@ void G_Ticker(boolean run)
|
||||||
{
|
{
|
||||||
players[i].botvars.difficulty -= bot_level_decrease;
|
players[i].botvars.difficulty -= bot_level_decrease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (already_min_lvl)
|
||||||
|
players[i].botvars.difficulty = max(players[i].botvars.difficulty, min_lvl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -5852,6 +5860,7 @@ void G_SetRetryFlag(void)
|
||||||
if (retrying == false && grandprixinfo.gp)
|
if (retrying == false && grandprixinfo.gp)
|
||||||
{
|
{
|
||||||
grandprixinfo.rank.continuesUsed++;
|
grandprixinfo.rank.continuesUsed++;
|
||||||
|
grandprixinfo.rank.levels[grandprixinfo.rank.numLevels].continues++;
|
||||||
}
|
}
|
||||||
|
|
||||||
retrying = true;
|
retrying = true;
|
||||||
|
|
|
||||||
|
|
@ -611,12 +611,10 @@ void K_IncreaseBotDifficulty(player_t *bot)
|
||||||
switch(averageRank)
|
switch(averageRank)
|
||||||
{
|
{
|
||||||
case GRADE_E:
|
case GRADE_E:
|
||||||
rankNudge = -2;
|
|
||||||
break;
|
|
||||||
case GRADE_D:
|
case GRADE_D:
|
||||||
|
case GRADE_C:
|
||||||
rankNudge = -1;
|
rankNudge = -1;
|
||||||
break;
|
break;
|
||||||
case GRADE_C:
|
|
||||||
case GRADE_B:
|
case GRADE_B:
|
||||||
rankNudge = 0;
|
rankNudge = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,10 @@ void podiumData_s::Init(void)
|
||||||
|
|
||||||
lvl->time = M_RandomRange(50*TICRATE, 210*TICRATE);
|
lvl->time = M_RandomRange(50*TICRATE, 210*TICRATE);
|
||||||
|
|
||||||
|
lvl->continues = 0;
|
||||||
|
if (!M_RandomRange(0, 2))
|
||||||
|
lvl->continues = M_RandomRange(1, 3);
|
||||||
|
|
||||||
for (INT32 j = 0; j < rank.numPlayers; j++)
|
for (INT32 j = 0; j < rank.numPlayers; j++)
|
||||||
{
|
{
|
||||||
gpRank_level_perplayer_t *const dta = &lvl->perPlayer[j];
|
gpRank_level_perplayer_t *const dta = &lvl->perPlayer[j];
|
||||||
|
|
@ -633,10 +637,13 @@ void podiumData_s::Draw(void)
|
||||||
|
|
||||||
if (lvl->event != GPEVENT_SPECIAL && dta->grade != GRADE_INVALID)
|
if (lvl->event != GPEVENT_SPECIAL && dta->grade != GRADE_INVALID)
|
||||||
{
|
{
|
||||||
drawer_rank
|
if (lvl->continues)
|
||||||
.xy(0, -1)
|
drawer_rank.xy(2, 1).font(srb2::Draw::Font::kPing).colorize(SKINCOLOR_RED).text(va("-%d", lvl->continues));
|
||||||
.colormap( static_cast<skincolornum_t>(K_GetGradeColor(dta->grade)) )
|
else
|
||||||
.patch(va("R_CUPRN%c", K_GetGradeChar(dta->grade)));
|
drawer_rank
|
||||||
|
.xy(0, -1)
|
||||||
|
.colormap( static_cast<skincolornum_t>(K_GetGradeColor(dta->grade)) )
|
||||||
|
.patch(va("R_CUPRN%c", K_GetGradeChar(dta->grade)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not draw any stats for GAME OVERed player
|
// Do not draw any stats for GAME OVERed player
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ struct gpRank_level_t
|
||||||
UINT32 time;
|
UINT32 time;
|
||||||
UINT16 totalExp;
|
UINT16 totalExp;
|
||||||
UINT16 totalPrisons;
|
UINT16 totalPrisons;
|
||||||
|
UINT16 continues;
|
||||||
gpRank_level_perplayer_t perPlayer[MAXSPLITSCREENPLAYERS];
|
gpRank_level_perplayer_t perPlayer[MAXSPLITSCREENPLAYERS];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6416,6 +6416,7 @@ static inline void P_ArchiveMisc(savebuffer_t *save)
|
||||||
WRITEUINT32(save->p, lvl->time);
|
WRITEUINT32(save->p, lvl->time);
|
||||||
WRITEUINT16(save->p, lvl->totalExp);
|
WRITEUINT16(save->p, lvl->totalExp);
|
||||||
WRITEUINT16(save->p, lvl->totalPrisons);
|
WRITEUINT16(save->p, lvl->totalPrisons);
|
||||||
|
WRITEUINT16(save->p, lvl->continues);
|
||||||
|
|
||||||
UINT8 j;
|
UINT8 j;
|
||||||
for (j = 0; j < rank->numPlayers; j++)
|
for (j = 0; j < rank->numPlayers; j++)
|
||||||
|
|
@ -6704,6 +6705,7 @@ static boolean P_UnArchiveSPGame(savebuffer_t *save)
|
||||||
lvl->time = READUINT32(save->p);
|
lvl->time = READUINT32(save->p);
|
||||||
lvl->totalExp = READUINT16(save->p);
|
lvl->totalExp = READUINT16(save->p);
|
||||||
lvl->totalPrisons = READUINT16(save->p);
|
lvl->totalPrisons = READUINT16(save->p);
|
||||||
|
lvl->continues = READUINT16(save->p);
|
||||||
|
|
||||||
for (j = 0; j < rank->numPlayers; j++)
|
for (j = 0; j < rank->numPlayers; j++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue