]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add cvars to disable plasma exploding on player touch and change midair combo radius
authorMario <mario.mario@y7mail.com>
Sun, 8 Dec 2013 07:06:56 +0000 (18:06 +1100)
committerMario <mario.mario@y7mail.com>
Sun, 8 Dec 2013 07:06:56 +0000 (18:06 +1100)
balanceXonotic.cfg
qcsrc/common/weapons/w_electro.qc

index fa56aaa67471c643624290b88fcc08106222dece..953fa7af1f5b2b7f8c8f1730fd04e1def0672b26 100644 (file)
@@ -429,6 +429,7 @@ set g_balance_electro_primary_force_up 0
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_comboradius 300
 set g_balance_electro_primary_midaircombo_interval 0.3
+set g_balance_electro_primary_midaircombo_radius 100
 set g_balance_electro_primary_speed 2500
 set g_balance_electro_primary_spread 0
 set g_balance_electro_primary_lifetime 5
@@ -455,6 +456,7 @@ set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_damageforcescale 4
 set g_balance_electro_secondary_damagedbycontents 1
+set g_balance_electro_secondary_takedamageexplode 1
 set g_balance_electro_secondary_count 3
 set g_balance_electro_secondary_bouncefactor 0.3
 set g_balance_electro_secondary_bouncestop 0.05
index af9a542914e39924bb04112d8435c503b685e18c..ed8154ee0f11d3ec5eeaf137dcb2a6f5f1ffbccc 100644 (file)
@@ -24,11 +24,13 @@ REGISTER_WEAPON(
        w_cvar(WEP_ELECTRO, electro, MO_BOTH, lifetime) \
        w_cvar(WEP_ELECTRO, electro, MO_PRI,  comboradius) \
        w_cvar(WEP_ELECTRO, electro, MO_PRI,  midaircombo_interval) \
+       w_cvar(WEP_ELECTRO, electro, MO_PRI,  midaircombo_radius) \
        w_cvar(WEP_ELECTRO, electro, MO_SEC,  bouncefactor) \
        w_cvar(WEP_ELECTRO, electro, MO_SEC,  bouncestop) \
        w_cvar(WEP_ELECTRO, electro, MO_SEC,  count) \
        w_cvar(WEP_ELECTRO, electro, MO_SEC,  damageforcescale) \
        w_cvar(WEP_ELECTRO, electro, MO_SEC,  damagedbycontents) \
+       w_cvar(WEP_ELECTRO, electro, MO_SEC,  takedamageexplode) \
        w_cvar(WEP_ELECTRO, electro, MO_SEC,  health) \
        w_cvar(WEP_ELECTRO, electro, MO_SEC,  refire2) \
        w_cvar(WEP_ELECTRO, electro, MO_SEC,  speed_up) \
@@ -156,7 +158,7 @@ void W_Plasma_Touch(void)
 {
        PROJECTILE_TOUCH;
        if(other.takedamage == DAMAGE_AIM)
-               { W_Plasma_Explode(); }
+               { if(WEP_CVAR_SEC(electro, takedamageexplode)) { W_Plasma_Explode(); } }
        else
        {
                //UpdateCSQCProjectile(self);
@@ -215,7 +217,7 @@ void W_Plasma_Damage(entity inflictor, entity attacker, float damage, float deat
 
 void W_Plasma_Think()
 {
-       self.nextthink = time + WEP_CVAR_PRI(electro, midaircombo_interval);
+       self.nextthink = min(time + WEP_CVAR_PRI(electro, midaircombo_interval), self.ltime);
        
        if(time >= self.ltime)
        {
@@ -223,7 +225,7 @@ void W_Plasma_Think()
                return;
        }
        
-       W_Plasma_TriggerCombo(self.origin, WEP_CVAR_PRI(electro, comboradius), self.realowner);
+       W_Plasma_TriggerCombo(self.origin, WEP_CVAR_PRI(electro, midaircombo_radius), self.realowner);
 }
 
 void W_Electro_Attack_Bolt(void)