From f8e61760f15ed6e3b15bd8693f0c3c2350394f0d Mon Sep 17 00:00:00 2001 From: NepDisk Date: Wed, 18 Mar 2026 12:36:34 -0400 Subject: [PATCH] Add missing doubled flashtics back to battle via gametyperule --- src/deh_tables.c | 2 +- src/doomstat.h | 22 +++++++++++----------- src/g_game.c | 2 +- src/k_kart.c | 6 ++++++ src/p_user.c | 2 +- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/deh_tables.c b/src/deh_tables.c index 705df6f35..3794bf3a2 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -464,13 +464,13 @@ const char *const GAMETYPERULE_LIST[] = { "CLOSERPLAYERS", "BATTLEBOXES", "BATTLESPEED", + "DOUBLEDFLASHTICS", "POINTLIMIT", "TIMELIMIT", "OVERTIME", "TEAMS", "NOTEAMS", "TEAMSTARTS", - "\x01", "LIVES", "SPECIALBOTS", "NOCOUNTDOWN", diff --git a/src/doomstat.h b/src/doomstat.h index 37540d3af..909cffac5 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -509,24 +509,24 @@ enum GameTypeRules GTR_CLOSERPLAYERS = 1<<14, // Enables specfic gameplay tweaks with closer players. GTR_BATTLEBOXES = 1<<15, // Itemboxes respawn differently. GTR_BATTLESPEED = 1<<16, // Use battle gamespeed cvar. + GTR_DOUBLEDFLASHTICS = 1<<17, // Double your flashtics after taking damage. - GTR_POINTLIMIT = 1<<17, // Reaching point limit ends the round. - GTR_TIMELIMIT = 1<<18, // Reaching time limit ends the round. - GTR_OVERTIME = 1<<19, // Allow overtime behavior. + GTR_POINTLIMIT = 1<<18, // Reaching point limit ends the round. + GTR_TIMELIMIT = 1<<19, // Reaching time limit ends the round. + GTR_OVERTIME = 1<<20, // Allow overtime behavior. // Custom gametype rules - GTR_TEAMS = 1<<20, // Teams are forced on. - GTR_NOTEAMS = 1<<21, // Teams are forced off. - GTR_TEAMSTARTS = 1<<22, // Use team-based start positions. + GTR_TEAMS = 1<<21, // Teams are forced on. + GTR_NOTEAMS = 1<<22, // Teams are forced off. + GTR_TEAMSTARTS = 1<<23, // Use team-based start positions. // Grand Prix rules - //Free = 1<<23, - GTR_LIVES = 1<<24, // Lives system, players are forced to spectate during Game Over. - GTR_SPECIALBOTS = 1<<25, // Bot difficulty gets stronger between rounds, and the rival system is enabled. + GTR_LIVES = 1<<25, // Lives system, players are forced to spectate during Game Over. + GTR_SPECIALBOTS = 1<<26, // Bot difficulty gets stronger between rounds, and the rival system is enabled. // Misc - GTR_NOCOUNTDOWN = 1<<26, // Disables Countdown timer and control lock at the start of levels. - GTR_ENCORE = 1<<27, // Enable Encore mode. + GTR_NOCOUNTDOWN = 1<<27, // Disables Countdown timer and control lock at the start of levels. + GTR_ENCORE = 1<<28, // Enable Encore mode. // free: to and including 1<<31 }; diff --git a/src/g_game.c b/src/g_game.c index 3a2cb2d46..a791a7607 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4163,7 +4163,7 @@ static gametype_t defaultgametypes[] = { "Battle", "GT_BATTLE", - GTR_BUMPERS|GTR_POINTS|GTR_RINGS|GTR_KARMA|GTR_WANTED|GTR_WANTEDSPB|GTR_ITEMARROWS|GTR_ITEMBREAKER|GTR_BATTLESTARTS|GTR_TIMELIMIT|GTR_POINTLIMIT|GTR_BATTLEODDS|GTR_CLOSERPLAYERS|GTR_BATTLEBOXES|GTR_BATTLESPEED, + GTR_BUMPERS|GTR_POINTS|GTR_RINGS|GTR_KARMA|GTR_WANTED|GTR_WANTEDSPB|GTR_ITEMARROWS|GTR_ITEMBREAKER|GTR_BATTLESTARTS|GTR_TIMELIMIT|GTR_POINTLIMIT|GTR_BATTLEODDS|GTR_CLOSERPLAYERS|GTR_BATTLEBOXES|GTR_BATTLESPEED|GTR_DOUBLEDFLASHTICS, TOL_BATTLE, int_battle, 0, diff --git a/src/k_kart.c b/src/k_kart.c index a697d1d6e..f37fc2d36 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3110,7 +3110,13 @@ UINT16 K_GetKartFlashing(const player_t *player) return tics; } + if (gametypes[gametype]->rules & GTR_DOUBLEDFLASHTICS) + { + tics *= 2; + } + tics += (tics/8) * (player->kartspeed); + return tics; } diff --git a/src/p_user.c b/src/p_user.c index 27220a742..1774421c9 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1476,7 +1476,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean fromAir) { player->mo->momx = player->mo->momx/2; player->mo->momy = player->mo->momy/2; - } + } } }