From: Martin Taibr Date: Thu, 16 Jan 2020 14:34:18 +0000 (+0100) Subject: more midair combo options: own/teammate/enemy X-Git-Tag: xonotic-v0.8.5~1161^2~11^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=237d6375e9e1d5913fc8c8e42c54acc275ef211b;p=xonotic%2Fxonotic-data.pk3dir.git more midair combo options: own/teammate/enemy --- diff --git a/bal-wep-mario.cfg b/bal-wep-mario.cfg index fa301e716..c366f381a 100644 --- a/bal-wep-mario.cfg +++ b/bal-wep-mario.cfg @@ -191,10 +191,12 @@ set g_balance_electro_primary_damage 40 set g_balance_electro_primary_edgedamage 20 set g_balance_electro_primary_force 200 set g_balance_electro_primary_lifetime 5 +set g_balance_electro_primary_midaircombo_enemy 1 set g_balance_electro_primary_midaircombo_explode 1 set g_balance_electro_primary_midaircombo_interval 0.1 set g_balance_electro_primary_midaircombo_own 1 set g_balance_electro_primary_midaircombo_radius 0 +set g_balance_electro_primary_midaircombo_teammate 1 set g_balance_electro_primary_radius 100 set g_balance_electro_primary_refire 0.6 set g_balance_electro_primary_speed 2500 diff --git a/bal-wep-nexuiz25.cfg b/bal-wep-nexuiz25.cfg index 830c64a71..d88becfbf 100644 --- a/bal-wep-nexuiz25.cfg +++ b/bal-wep-nexuiz25.cfg @@ -191,10 +191,12 @@ set g_balance_electro_primary_damage 65 set g_balance_electro_primary_edgedamage 0 set g_balance_electro_primary_force 200 set g_balance_electro_primary_lifetime 30 +set g_balance_electro_primary_midaircombo_enemy 1 set g_balance_electro_primary_midaircombo_explode 0 set g_balance_electro_primary_midaircombo_interval 0 set g_balance_electro_primary_midaircombo_own 1 set g_balance_electro_primary_midaircombo_radius 0 +set g_balance_electro_primary_midaircombo_teammate 1 set g_balance_electro_primary_radius 150 set g_balance_electro_primary_refire 0.6 set g_balance_electro_primary_speed 2000 diff --git a/bal-wep-samual.cfg b/bal-wep-samual.cfg index 5afffecc1..cb875d2aa 100644 --- a/bal-wep-samual.cfg +++ b/bal-wep-samual.cfg @@ -191,10 +191,12 @@ set g_balance_electro_primary_damage 40 set g_balance_electro_primary_edgedamage 20 set g_balance_electro_primary_force 200 set g_balance_electro_primary_lifetime 5 +set g_balance_electro_primary_midaircombo_enemy 1 set g_balance_electro_primary_midaircombo_explode 1 set g_balance_electro_primary_midaircombo_interval 0.1 set g_balance_electro_primary_midaircombo_own 1 set g_balance_electro_primary_midaircombo_radius 100 +set g_balance_electro_primary_midaircombo_teammate 1 set g_balance_electro_primary_radius 100 set g_balance_electro_primary_refire 0.6 set g_balance_electro_primary_speed 2500 diff --git a/bal-wep-testing.cfg b/bal-wep-testing.cfg index 4a9ca84fa..07d96f6e8 100644 --- a/bal-wep-testing.cfg +++ b/bal-wep-testing.cfg @@ -191,10 +191,12 @@ set g_balance_electro_primary_damage 40 set g_balance_electro_primary_edgedamage 20 set g_balance_electro_primary_force 200 set g_balance_electro_primary_lifetime 5 +set g_balance_electro_primary_midaircombo_enemy 1 set g_balance_electro_primary_midaircombo_explode 1 set g_balance_electro_primary_midaircombo_interval 0.1 set g_balance_electro_primary_midaircombo_own 1 set g_balance_electro_primary_midaircombo_radius 0 +set g_balance_electro_primary_midaircombo_teammate 1 set g_balance_electro_primary_radius 100 set g_balance_electro_primary_refire 0.6 set g_balance_electro_primary_speed 2500 diff --git a/bal-wep-xdf.cfg b/bal-wep-xdf.cfg index 41ac46e76..a9d71f508 100644 --- a/bal-wep-xdf.cfg +++ b/bal-wep-xdf.cfg @@ -191,10 +191,12 @@ set g_balance_electro_primary_damage 40 set g_balance_electro_primary_edgedamage 20 set g_balance_electro_primary_force 200 set g_balance_electro_primary_lifetime 5 +set g_balance_electro_primary_midaircombo_enemy 1 set g_balance_electro_primary_midaircombo_explode 1 set g_balance_electro_primary_midaircombo_interval 0.1 set g_balance_electro_primary_midaircombo_own 1 set g_balance_electro_primary_midaircombo_radius 100 +set g_balance_electro_primary_midaircombo_teammate 1 set g_balance_electro_primary_radius 100 set g_balance_electro_primary_refire 0.6 set g_balance_electro_primary_speed 2500 diff --git a/bal-wep-xonotic.cfg b/bal-wep-xonotic.cfg index b8469f84c..23c8600f5 100644 --- a/bal-wep-xonotic.cfg +++ b/bal-wep-xonotic.cfg @@ -191,10 +191,12 @@ set g_balance_electro_primary_damage 40 set g_balance_electro_primary_edgedamage 20 set g_balance_electro_primary_force 200 set g_balance_electro_primary_lifetime 5 +set g_balance_electro_primary_midaircombo_enemy 1 set g_balance_electro_primary_midaircombo_explode 1 set g_balance_electro_primary_midaircombo_interval 0.1 set g_balance_electro_primary_midaircombo_own 1 set g_balance_electro_primary_midaircombo_radius 0 +set g_balance_electro_primary_midaircombo_teammate 1 set g_balance_electro_primary_radius 100 set g_balance_electro_primary_refire 0.6 set g_balance_electro_primary_speed 2500 diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index f7ac37287..c1709322e 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -152,18 +152,35 @@ void W_Electro_Bolt_Think(entity this) // loop through nearby orbs and trigger them while(e) { - if(e.classname == "electro_orb" && (WEP_CVAR_PRI(electro, midaircombo_own) || DIFF_TEAM(this.owner, e.owner))) + if(e.classname == "electro_orb") { - // change owner to whoever caused the combo explosion - e.realowner = this.realowner; - e.takedamage = DAMAGE_NO; - e.classname = "electro_orb_chain"; + bool explode; + if (this.owner == e.owner) + { + explode = WEP_CVAR_PRI(electro, midaircombo_own); + } + else if (SAME_TEAM(this.owner, e.owner)) + { + explode = WEP_CVAR_PRI(electro, midaircombo_teammate); + } + else + { + explode = WEP_CVAR_PRI(electro, midaircombo_enemy); + } + + if (explode) + { + // change owner to whoever caused the combo explosion + e.realowner = this.realowner; + e.takedamage = DAMAGE_NO; + e.classname = "electro_orb_chain"; - // explode first orb immediately, other orbs will chain with delay - setthink(e, W_Electro_ExplodeCombo); - e.nextthink = time; + // explode first orb immediately, other orbs will chain with delay + setthink(e, W_Electro_ExplodeCombo); + e.nextthink = time; - ++found; + ++found; + } } e = e.chain; } diff --git a/qcsrc/common/weapons/weapon/electro.qh b/qcsrc/common/weapons/weapon/electro.qh index 460301829..c7ad6e951 100644 --- a/qcsrc/common/weapons/weapon/electro.qh +++ b/qcsrc/common/weapons/weapon/electro.qh @@ -40,10 +40,12 @@ CLASS(Electro, Weapon) P(class, prefix, force, float, BOTH) \ P(class, prefix, health, float, SEC) \ P(class, prefix, lifetime, float, BOTH) \ + P(class, prefix, midaircombo_enemy, bool, PRI) \ P(class, prefix, midaircombo_explode, float, PRI) \ P(class, prefix, midaircombo_interval, float, PRI) \ P(class, prefix, midaircombo_own, bool, PRI) \ P(class, prefix, midaircombo_radius, float, PRI) \ + P(class, prefix, midaircombo_teammate, float, PRI) \ P(class, prefix, radius, float, BOTH) \ P(class, prefix, refire2, float, SEC) \ P(class, prefix, refire, float, BOTH) \