Make GTR_BUMPERS less monolithic

* Battle-like item box respawn handling inverse of GTR_CIRCUIT
* Make battle fullscreen overlay forbid GTR_CIRCUIT
* Make GTR_ITEMARROWS actually do something
* Make everything related to points actually use GTR_POINTLIMIT
* Fobid sphere addition without GTR_SPHERES, to mirror ring addition forbidding
This commit is contained in:
toaster 2022-12-31 23:12:41 +00:00
parent c23a2d8dca
commit 425a02d09b
7 changed files with 17 additions and 11 deletions

View file

@ -3773,7 +3773,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
// Clear player score and rings if a spectator.
if (players[playernum].spectator)
{
if (gametyperules & GTR_BUMPERS) // SRB2kart
if (gametyperules & GTR_POINTLIMIT) // SRB2kart
{
players[playernum].roundscore = 0;
K_CalculateBattleWanted();

View file

@ -5030,9 +5030,9 @@ void K_drawKartHUD(void)
return;
}
battlefullscreen = ((gametyperules & (GTR_BUMPERS))
battlefullscreen = (!(gametyperules & GTR_CIRCUIT)
&& (stplyr->exiting
|| (stplyr->bumpers <= 0
|| ((gametyperules & GTR_BUMPERS) && (stplyr->bumpers <= 0)
&& ((gametyperules & GTR_KARMA) && (stplyr->karmadelay > 0))
&& !(stplyr->pflags & PF_ELIMINATED)
&& stplyr->playerstate == PST_LIVE)));

View file

@ -13053,7 +13053,7 @@ void A_ItemPop(mobj_t *actor)
}
// Here at mapload in battle?
if ((gametyperules & GTR_BUMPERS) && (actor->flags2 & MF2_BOSSNOTRAP))
if (!(gametyperules & GTR_CIRCUIT) && (actor->flags2 & MF2_BOSSNOTRAP))
{
numgotboxes++;

View file

@ -1099,7 +1099,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
{
P_SetTarget(&target->target, source);
if (gametyperules & GTR_BUMPERS)
if (!(gametyperules & GTR_CIRCUIT))
{
target->fuse = 2;
}

View file

@ -9581,7 +9581,7 @@ static boolean P_FuseThink(mobj_t *mobj)
{
;
}
else if ((gametyperules & GTR_BUMPERS) && (mobj->state == &states[S_INVISIBLE]))
else if (!(gametyperules & GTR_CIRCUIT) && (mobj->state == &states[S_INVISIBLE]))
{
break;
}
@ -11419,7 +11419,7 @@ void P_RespawnBattleBoxes(void)
{
thinker_t *th;
if (!(gametyperules & GTR_BUMPERS))
if (gametyperules & GTR_CIRCUIT)
return;
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
@ -11684,13 +11684,16 @@ void P_SpawnPlayer(INT32 playernum)
K_InitStumbleIndicator(p);
if (gametyperules & GTR_BUMPERS)
if (gametyperules & GTR_ITEMARROWS)
{
mobj_t *overheadarrow = P_SpawnMobj(mobj->x, mobj->y, mobj->z + mobj->height + 16*FRACUNIT, MT_PLAYERARROW);
P_SetTarget(&overheadarrow->target, mobj);
overheadarrow->renderflags |= RF_DONTDRAW;
P_SetScale(overheadarrow, mobj->destscale);
}
if (gametyperules & GTR_BUMPERS)
{
if (p->spectator)
{
// HEY! No being cheap...

View file

@ -361,7 +361,7 @@ static inline void P_RunThinkers(void)
if (gametyperules & GTR_PAPERITEMS)
K_RunPaperItemSpawners();
if ((gametyperules & GTR_BUMPERS) && battleovertime.enabled)
if ((gametyperules & GTR_OVERTIME) && battleovertime.enabled)
K_RunBattleOvertime();
}
@ -719,7 +719,7 @@ void P_Ticker(boolean run)
K_TickSpecialStage();
if ((gametyperules & GTR_BUMPERS))
if ((gametyperules & GTR_POINTLIMIT))
{
if (wantedcalcdelay && --wantedcalcdelay <= 0)
K_CalculateBattleWanted();

View file

@ -520,6 +520,9 @@ INT32 P_GivePlayerSpheres(player_t *player, INT32 num_spheres)
{
num_spheres += player->spheres;
if (!(gametyperules & GTR_SPHERES)) // No spheres in Race mode)
return 0;
// Not alive
if ((gametyperules & GTR_BUMPERS) && (player->bumpers <= 0))
return 0;
@ -555,7 +558,7 @@ void P_GivePlayerLives(player_t *player, INT32 numlives)
// Adds to the player's score
void P_AddPlayerScore(player_t *player, UINT32 amount)
{
if (!((gametyperules & GTR_BUMPERS)))
if (!((gametyperules & GTR_POINTLIMIT)))
return;
if (player->exiting) // srb2kart