From: Mario Date: Sun, 8 Dec 2013 07:06:56 +0000 (+1100) Subject: Add cvars to disable plasma exploding on player touch and change midair combo radius X-Git-Tag: xonotic-v0.8.0~152^2~292 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8875e9da16b508a7663e936a7d7ba5a4f9b064c8;p=xonotic%2Fxonotic-data.pk3dir.git Add cvars to disable plasma exploding on player touch and change midair combo radius --- diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index fa56aaa67..953fa7af1 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -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 diff --git a/qcsrc/common/weapons/w_electro.qc b/qcsrc/common/weapons/w_electro.qc index af9a54291..ed8154ee0 100644 --- a/qcsrc/common/weapons/w_electro.qc +++ b/qcsrc/common/weapons/w_electro.qc @@ -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)