From 4745f36e47d23a97db995c65d90e253c328864c3 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 27 Dec 2023 17:06:00 -0600 Subject: [PATCH] Disable permanent 'out of ammo' message in Derby In Derby, weapons don't spawn and player's only start with Gauntlet. --- engine/code/cgame/cg_draw.c | 2 +- engine/code/cgame/cg_playerstate.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/engine/code/cgame/cg_draw.c b/engine/code/cgame/cg_draw.c index d80c9c63..5c82708a 100644 --- a/engine/code/cgame/cg_draw.c +++ b/engine/code/cgame/cg_draw.c @@ -2903,7 +2903,7 @@ static void CG_DrawAmmoWarning( void ) { int w; // Q3Rally Code Start - if (isRallyNonDMRace()){ + if (isRallyNonDMRace() || cgs.gametype == GT_DERBY){ return; } // Q3Rally Code END diff --git a/engine/code/cgame/cg_playerstate.c b/engine/code/cgame/cg_playerstate.c index 58a65182..06c17128 100644 --- a/engine/code/cgame/cg_playerstate.c +++ b/engine/code/cgame/cg_playerstate.c @@ -36,6 +36,14 @@ void CG_CheckAmmo( void ) { int previous; int weapons; +// Q3Rally Code Start + if ( cg.snap->ps.weapon == WP_NONE || + cg.snap->ps.weapon == WP_GAUNTLET ) { + cg.lowAmmoWarning = 0; + return; + } +// Q3Rally Code END + // see about how many seconds of ammo we have remaining weapons = cg.snap->ps.stats[ STAT_WEAPONS ]; total = 0;