]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove nade blasts from all nades except normal nade
authorotta8634 <k9wolf@pm.me>
Fri, 21 Feb 2025 16:38:15 +0000 (00:38 +0800)
committerotta8634 <k9wolf@pm.me>
Fri, 21 Feb 2025 16:38:15 +0000 (00:38 +0800)
If a nade can do what normal nade does but something extra, nobody would ever pick normal nade, and it's not well balanced.
Also deleted g_nades_napalm_blast, since that only existed for the purpose of allowing the blast to be disabled for it.

mutators.cfg
qcsrc/common/mutators/mutator/nades/nade/napalm.qh
qcsrc/common/mutators/mutator/nades/sv_nades.qc

index 9b14768681f5a838d070edecdc71a70ea811fe34..540c0615b7d19b16c5c5a5a75db956c75f0a35a5 100644 (file)
@@ -240,7 +240,6 @@ set g_nades_bonus_score_time_flagcarrier 2 "bonus nade score given per second as
 
 // Napalm (2)
 set g_nades_napalm 0 "Napalm nade: spreads fire balls around the fountain and burns for a while; \"1\" = allow client selection of this nade type" // script-ignore
-set g_nades_napalm_blast 1 "whether the napalm grenades also give damage with the usual grenade explosion"
 set g_nades_napalm_burntime 0.5 "time that the fire from napalm will stick to the player"
 set g_nades_napalm_selfdamage 1 "whether the player that tossed the nade can be harmed by its fire"
 // Napalm fireballs
index e8ee871e44ec456ef085719f5d5b172804f7bd21..e8092e9b8f5afbb4e506efa71f861ce1369830aa 100644 (file)
@@ -10,7 +10,6 @@ float autocvar_g_nades_napalm_ball_damage;
 float autocvar_g_nades_napalm_ball_damageforcescale;
 float autocvar_g_nades_napalm_ball_lifetime;
 float autocvar_g_nades_napalm_ball_radius;
-bool autocvar_g_nades_napalm_blast;
 float autocvar_g_nades_napalm_fountain_lifetime;
 float autocvar_g_nades_napalm_fountain_delay;
 float autocvar_g_nades_napalm_fountain_radius;
index bd5249943391858c51c5265157d92021e7752238..c037315c969e50981c8c87d0db6577ebab8458f4 100644 (file)
@@ -107,30 +107,30 @@ entity nades_spawn_orb(entity own, entity realown, vector org, float orb_ltime,
 void nade_boom(entity this)
 {
        entity expef = NULL;
-       bool nade_blast = true;
        vector expcol_min = '0 0 0', expcol_max = '0 0 0';
 
-#define SET_NADE_EFFECT(nade_type, blast, exp_effect, exp_color_min, exp_color_max) \
+       Nade ntype = REGISTRY_GET(Nades, STAT(NADE_BONUS_TYPE, this));
+
+#define SET_NADE_EFFECT(nade_type, exp_effect, exp_color_min, exp_color_max) \
        case nade_type: \
-               nade_blast = blast; \
                expef = exp_effect; \
                expcol_min = exp_color_min; \
                expcol_max = exp_color_max; \
                break
 
-       switch ( REGISTRY_GET(Nades, STAT(NADE_BONUS_TYPE, this)) )
-       {
-               SET_NADE_EFFECT(NADE_TYPE_NAPALM,      autocvar_g_nades_napalm_blast, EFFECT_EXPLOSION_MEDIUM, '0 0 0', '0 0 0');
-               SET_NADE_EFFECT(NADE_TYPE_ICE,         false,                         EFFECT_ELECTRO_COMBO,    '0 0 0', '0 0 0');
-               SET_NADE_EFFECT(NADE_TYPE_TRANSLOCATE, false,                         NULL,                    '0 0 0', '0 0 0');
-               SET_NADE_EFFECT(NADE_TYPE_MONSTER,     true,                          NULL,                    nades_PlayerColor(this.realowner, false), nades_PlayerColor(this.realowner, true));
-               SET_NADE_EFFECT(NADE_TYPE_SPAWN,       false,                         EFFECT_SPAWN,            nades_PlayerColor(this.realowner, false), nades_PlayerColor(this.realowner, true));
-               SET_NADE_EFFECT(NADE_TYPE_HEAL,        false,                         EFFECT_SPAWN,            '1 0 0', '1 0 0');
-               SET_NADE_EFFECT(NADE_TYPE_ENTRAP,      false,                         EFFECT_SPAWN,            '1 1 0', '1 1 0');
-               SET_NADE_EFFECT(NADE_TYPE_VEIL,        false,                         EFFECT_SPAWN,            '0 0 0', '0 0 0');
-               SET_NADE_EFFECT(NADE_TYPE_AMMO,        false,                         EFFECT_SPAWN,            '0.66 0.33 0', '0.66 0.33 0');
-               SET_NADE_EFFECT(NADE_TYPE_DARKNESS,    false,                         EFFECT_EXPLOSION_MEDIUM, '0 0 0', '0 0 0');
-               SET_NADE_EFFECT(NADE_TYPE_NORMAL,      true,                          EFFECT_NADE_EXPLODE,     nades_PlayerColor(this.realowner, false), nades_PlayerColor(this.realowner, true));
+       switch(ntype)
+       {
+               SET_NADE_EFFECT(NADE_TYPE_NAPALM,      EFFECT_EXPLOSION_MEDIUM, '0 0 0', '0 0 0');
+               SET_NADE_EFFECT(NADE_TYPE_ICE,         EFFECT_ELECTRO_COMBO,    '0 0 0', '0 0 0');
+               SET_NADE_EFFECT(NADE_TYPE_TRANSLOCATE, NULL,                    '0 0 0', '0 0 0');
+               SET_NADE_EFFECT(NADE_TYPE_MONSTER,     NULL,                    nades_PlayerColor(this.realowner, false), nades_PlayerColor(this.realowner, true));
+               SET_NADE_EFFECT(NADE_TYPE_SPAWN,       EFFECT_SPAWN,            nades_PlayerColor(this.realowner, false), nades_PlayerColor(this.realowner, true));
+               SET_NADE_EFFECT(NADE_TYPE_HEAL,        EFFECT_SPAWN,            '1 0 0', '1 0 0');
+               SET_NADE_EFFECT(NADE_TYPE_ENTRAP,      EFFECT_SPAWN,            '1 1 0', '1 1 0');
+               SET_NADE_EFFECT(NADE_TYPE_VEIL,        EFFECT_SPAWN,            '0 0 0', '0 0 0');
+               SET_NADE_EFFECT(NADE_TYPE_AMMO,        EFFECT_SPAWN,            '0.66 0.33 0', '0.66 0.33 0');
+               SET_NADE_EFFECT(NADE_TYPE_DARKNESS,    EFFECT_EXPLOSION_MEDIUM, '0 0 0', '0 0 0');
+               SET_NADE_EFFECT(NADE_TYPE_NORMAL,      EFFECT_NADE_EXPLODE,     nades_PlayerColor(this.realowner, false), nades_PlayerColor(this.realowner, true));
                default: expef = EFFECT_NADE_EXPLODE; expcol_min = nades_PlayerColor(this.realowner, false); expcol_max = nades_PlayerColor(this.realowner, true); break;
        }
 #undef SET_NADE_EFFECT
@@ -143,11 +143,11 @@ void nade_boom(entity this)
 
        this.event_damage = func_null; // prevent somehow calling damage in the next call
 
-       if(nade_blast)
+       if(ntype == NADE_TYPE_NORMAL)
                normal_nade_boom(this);
 
        if(this.takedamage)
-       switch ( REGISTRY_GET(Nades, STAT(NADE_BONUS_TYPE, this)) )
+       switch(ntype)
        {
                case NADE_TYPE_NAPALM:      nade_napalm_boom(this);      break;
                case NADE_TYPE_ICE:         nade_ice_boom(this);         break;