mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-04 06:02:54 +00:00
more Duel
This commit is contained in:
parent
63659b126b
commit
3d39ab5225
7 changed files with 26 additions and 7 deletions
|
|
@ -783,6 +783,8 @@ consvar_t cv_timelimit = UnsavedNetVar("timelimit", "Default").min_max(1, 30*60,
|
|||
|
||||
consvar_t cv_votetime = UnsavedNetVar("votetime", "20").min_max(10, 3600);
|
||||
|
||||
consvar_t cv_dueltimelimit = UnsavedNetVar("dueltimelimit", "180").min_max(0, 3600);
|
||||
consvar_t cv_duelscorelimit = UnsavedNetVar("duelscorelimit", "3").min_max(1, 9);
|
||||
|
||||
//
|
||||
// Online cheats - synced in netgames.
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ extern consvar_t cv_joyscale[MAXSPLITSCREENPLAYERS];
|
|||
|
||||
extern consvar_t cv_pointlimit;
|
||||
extern consvar_t cv_timelimit;
|
||||
extern consvar_t cv_dueltimelimit, cv_duelscorelimit;
|
||||
extern consvar_t cv_numlaps;
|
||||
extern UINT32 timelimitintics, extratimeintics, secretextratime;
|
||||
extern UINT32 g_pointlimit;
|
||||
|
|
|
|||
|
|
@ -2067,6 +2067,11 @@ void K_UpdateBotGameplayVars(player_t *player)
|
|||
if (cv_levelskull.value)
|
||||
player->botvars.difficulty = MAXBOTDIFFICULTY;
|
||||
|
||||
if (K_InRaceDuel())
|
||||
player->botvars.rival = true;
|
||||
else if (grandprixinfo.gp != true)
|
||||
player->botvars.rival = false;
|
||||
|
||||
player->botvars.rubberband = K_UpdateRubberband(player);
|
||||
|
||||
player->botvars.turnconfirm += player->cmd.bot.turnconfirm;
|
||||
|
|
|
|||
|
|
@ -3310,10 +3310,11 @@ static void K_drawKartDuelScores(void)
|
|||
|
||||
if (leveltime != duel_lastleveltime)
|
||||
{
|
||||
INT32 slide = std::max(1, abs(targetyouheight - youheight)/3);
|
||||
if (targetyouheight > youheight)
|
||||
youheight++;
|
||||
youheight += slide;
|
||||
else if (targetyouheight < youheight)
|
||||
youheight--;
|
||||
youheight -= slide;
|
||||
}
|
||||
duel_lastleveltime = leveltime;
|
||||
|
||||
|
|
@ -5028,7 +5029,7 @@ playertagtype_t K_WhichPlayerTag(player_t *p)
|
|||
}
|
||||
else if (p->bot)
|
||||
{
|
||||
if (p->botvars.rival == true || cv_levelskull.value)
|
||||
if ((p->botvars.rival == true || cv_levelskull.value) && (!K_InRaceDuel()))
|
||||
{
|
||||
return PLAYERTAG_RIVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4284,7 +4284,7 @@ void K_CheckpointCrossAward(player_t *player)
|
|||
{
|
||||
player->duelscore += 1;
|
||||
|
||||
if (leveltime > DUELOVERTIME)
|
||||
if (leveltime > (tic_t)(TICRATE*DUELOVERTIME))
|
||||
{
|
||||
overtimecheckpoints++;
|
||||
if (overtimecheckpoints > 1)
|
||||
|
|
@ -4298,7 +4298,6 @@ void K_CheckpointCrossAward(player_t *player)
|
|||
|
||||
if (player->duelscore - opp->duelscore == DUELWINNINGSCORE)
|
||||
{
|
||||
player_t *opp = K_DuelOpponent(player);
|
||||
opp->position = 2;
|
||||
player->position = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ Make sure this matches the actual number of states
|
|||
#define RINGVOLUMEREGEN 1
|
||||
#define RINGTRANSPARENCYREGEN 3
|
||||
|
||||
#define DUELOVERTIME (3*60*TICRATE)
|
||||
#define DUELWINNINGSCORE (3)
|
||||
#define DUELOVERTIME (cv_dueltimelimit.value)
|
||||
#define DUELWINNINGSCORE (cv_duelscorelimit.value)
|
||||
|
||||
#define MIN_WAVEDASH_CHARGE ((11*TICRATE/16)*9)
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,17 @@ menuitem_t OPTIONS_Gameplay[] =
|
|||
NULL, {.cvar = &cv_kartbumpers}, 0, 0},
|
||||
|
||||
|
||||
|
||||
{IT_HEADER, "Duel...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Duel Time Limit", "How long it takes for Margin Boost to kick in (seconds).",
|
||||
NULL, {.cvar = &cv_dueltimelimit}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Duel Score Limit", "How many points a player must be ahead to win a Duel.",
|
||||
NULL, {.cvar = &cv_duelscorelimit}, 0, 0},
|
||||
|
||||
|
||||
{IT_SPACE | IT_DYBIGSPACE, NULL, NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue