* Re-enable sphere HUD in bosses.

* Do a little more anti-overtime checking for bosses. (This *really* requires a refactor at some point, but not right now)
This commit is contained in:
toaster 2022-02-27 17:43:41 +00:00
parent 5a06239a20
commit 17e5f71b5d
3 changed files with 9 additions and 10 deletions

View file

@ -4486,7 +4486,7 @@ UINT32 timelimitintics = 0;
static void TimeLimit_OnChange(void)
{
// Don't allow timelimit in Single Player/Co-Op/Race!
if (server && Playing() && cv_timelimit.value != 0 && !(gametyperules & GTR_TIMELIMIT))
if (server && Playing() && cv_timelimit.value != 0 && (bossinfo.boss || !(gametyperules & GTR_TIMELIMIT)))
{
CV_SetValue(&cv_timelimit, 0);
return;

View file

@ -2369,9 +2369,7 @@ static void K_drawKartAccessibilityIcons(INT32 fx)
if (r_splitscreen < 2) // adjust to speedometer height
{
if (bossinfo.boss)
fy += 8;
else if (gametype == GT_BATTLE)
if (gametype == GT_BATTLE)
fy -= 4;
}
else
@ -2458,9 +2456,7 @@ static void K_drawKartSpeedometer(void)
numbers[1] = ((convSpeed / 10) % 10);
numbers[2] = (convSpeed % 10);
if (bossinfo.boss)
battleoffset = 8;
else if (gametype == GT_BATTLE)
if (gametype == GT_BATTLE)
battleoffset = -4;
V_DrawScaledPatch(LAPS_X, LAPS_Y-25 + battleoffset, V_HUDTRANS|V_SLIDEIN|splitflags, kp_speedometersticker);
@ -2609,10 +2605,9 @@ static void K_drawKartBumpersOrKarma(void)
else
V_DrawMappedPatch(LAPS_X, LAPS_Y, V_HUDTRANS|V_SLIDEIN|splitflags, kp_bumpersticker, colormap);
// TODO BETTER HUD
if (bossinfo.boss)
V_DrawKartString(LAPS_X+47, LAPS_Y+3, V_HUDTRANS|V_SLIDEIN|splitflags, va("%d/%d", stplyr->bumpers, maxbumper));
else
else // TODO BETTER HUD
V_DrawKartString(LAPS_X+47, LAPS_Y+3, V_HUDTRANS|V_SLIDEIN|splitflags, va("%d/%d %d", stplyr->bumpers, maxbumper, stplyr->overtimekarma / TICRATE));
}
}
@ -4696,7 +4691,7 @@ void K_drawKartHUD(void)
K_drawKartAccessibilityIcons((r_splitscreen > 1) ? 0 : 8);
}
if (!bossinfo.boss && gametyperules & GTR_SPHERES)
if (gametyperules & GTR_SPHERES)
{
K_drawBlueSphereMeter();
}

View file

@ -34,6 +34,7 @@
#include "k_battle.h"
#include "k_pwrlv.h"
#include "k_grandprix.h"
#include "k_boss.h"
#include "k_respawn.h"
#include "p_spec.h"
@ -636,6 +637,9 @@ void P_CheckTimeLimit(void)
if (leveltime < (timelimitintics + starttime))
return;
if (bossinfo.boss == true)
return;
if (gameaction == ga_completed)
return;