3-way instant-gib

This commit is contained in:
Izuru Yakumo
2025-07-25 20:50:06 -03:00
parent 504bb283f4
commit bb02344d94
2 changed files with 13 additions and 7 deletions

View File

@@ -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;

View File

@@ -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;
}