From bb02344d94a39a23ba9dffb3b7ee528ecfa5e26a Mon Sep 17 00:00:00 2001 From: Izuru Yakumo Date: Fri, 25 Jul 2025 20:50:06 -0300 Subject: [PATCH] 3-way instant-gib --- code/game/ai_dmq3.c | 8 ++++---- code/game/g_client.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/code/game/ai_dmq3.c b/code/game/ai_dmq3.c index d3a4137..c32f971 100644 --- a/code/game/ai_dmq3.c +++ b/code/game/ai_dmq3.c @@ -1681,9 +1681,9 @@ void BotChooseWeapon(bot_state_t *bs) { trap_EA_SelectWeapon(bs->client, bs->weaponnum); } else { - if ( g_instantgib.integer == 1 || g_weaponarena.integer == 7 ) { + if ( g_instantgib.integer || g_weaponarena.integer == 7 ) { newweaponnum = WP_RAILGUN; - } else if ( g_weaponarena.integer == 5 ) { + } else if ( g_instantgib.integer || g_weaponarena.integer == 5 ) { newweaponnum = WP_ROCKET_LAUNCHER; } else if ( g_weaponarena.integer == 1 ) { newweaponnum = WP_GAUNTLET; @@ -1691,7 +1691,7 @@ void BotChooseWeapon(bot_state_t *bs) { newweaponnum = WP_MACHINEGUN; } else if ( g_weaponarena.integer == 3 ) { newweaponnum = WP_SHOTGUN; - } else if ( g_weaponarena.integer == 4 ) { + } else if ( g_instantgib.integer || g_weaponarena.integer == 4 ) { newweaponnum = WP_GRENADE_LAUNCHER; } else if ( g_weaponarena.integer == 6 ) { newweaponnum = WP_LIGHTNING; @@ -1699,7 +1699,7 @@ void BotChooseWeapon(bot_state_t *bs) { newweaponnum = WP_PLASMAGUN; } else if ( g_weaponarena.integer == 9 ) { newweaponnum = WP_BFG; - } else if ( g_instantgib.integer > 2 || g_weaponarena.integer == 10 ) { + } else if ( g_instantgib.integer || g_weaponarena.integer == 10 ) { newweaponnum = WP_NAILGUN; } else if ( g_weaponarena.integer == 11 ) { newweaponnum = WP_PROX_LAUNCHER; diff --git a/code/game/g_client.c b/code/game/g_client.c index db66706..7c3ca23 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -1988,15 +1988,21 @@ else ent->health = client->ps.stats[STAT_ARMOR] = g_elimination_startArmor.integer; //client->ps.stats[STAT_MAX_HEALTH]*2; ent->health = client->ps.stats[STAT_HEALTH] = g_elimination_startHealth.integer; //client->ps.stats[STAT_MAX_HEALTH]*2; } - //Instantgib mode, replace weapons with rail (and maybe gauntlet) + // Instant-gib mode, replace standard loadout with an alternating loadout + // 1: Only Railgun + // 2: Gauntlet + Railgun + // 3: Nailgun + Railgun + // + // Note: CPU-controlled bots can only use the Railgun, no matter + // the settings given. if(g_instantgib.integer) { client->ps.stats[STAT_WEAPONS] = ( 1 << WP_RAILGUN ); client->ps.ammo[WP_RAILGUN] = -1; //Don't display any ammo - if(g_instantgib.integer > 1) { + if(g_instantgib.integer == 2) { client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GAUNTLET ); client->ps.ammo[WP_GAUNTLET] = -1; } - if(g_instantgib.integer > 2) { + if(g_instantgib.integer == 3) { client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_NAILGUN ); client->ps.ammo[WP_NAILGUN] = -1; }