more midair combo options: own/teammate/enemy
authorMartin Taibr <taibr.martin@gmail.com>
Thu, 16 Jan 2020 14:34:18 +0000 (15:34 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Thu, 16 Jan 2020 14:34:18 +0000 (15:34 +0100)
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-testing.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/electro.qh

index fa301e71613130f066b0ac4fad714c57761230c3..c366f381a5716e5c13af010aef24fba1510bd038 100644 (file)
@@ -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_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_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
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
 set g_balance_electro_primary_speed 2500
index 830c64a71fe22cf1ba1fef24089133577bd79e75..d88becfbf62bf69fd394943cc50455380948fb3a 100644 (file)
@@ -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_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_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
 set g_balance_electro_primary_radius 150
 set g_balance_electro_primary_refire 0.6
 set g_balance_electro_primary_speed 2000
index 5afffecc1759a513bfed70946ee1d83f7dbfd86f..cb875d2aa3c26d5d9a4bafae7f185488b26a1766 100644 (file)
@@ -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_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_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
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
 set g_balance_electro_primary_speed 2500
index 4a9ca84fa2dad80762875b4892bf31e6aebabb3a..07d96f6e83a81b2a25a40a2f1f796f2e7da29dfb 100644 (file)
@@ -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_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_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
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
 set g_balance_electro_primary_speed 2500
index 41ac46e769a55e5fcadb3570c79b059e34e06358..a9d71f5083398a907ad1cca119ed94c2f8f5c143 100644 (file)
@@ -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_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_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
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
 set g_balance_electro_primary_speed 2500
index b8469f84c5b5dbb41729b4e99c6a6efdb269eb26..23c8600f5a8f57e8a95f0444e4fed2de3dd93c2d 100644 (file)
@@ -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_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_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
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
 set g_balance_electro_primary_speed 2500
index f7ac37287d9d7c6af4d97df5fa2f05f976b8084c..c1709322e44b14f30b2e84898efdb785ea213d21 100644 (file)
@@ -152,18 +152,35 @@ void W_Electro_Bolt_Think(entity this)
                // loop through nearby orbs and trigger them
                while(e)
                {
                // 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;
                }
                        }
                        e = e.chain;
                }
index 460301829892c08ca6fa8a592fbc81d36d4d472d..c7ad6e95106c07af6ff74155133dfdde3cd7562c 100644 (file)
@@ -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, 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_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) \
                P(class, prefix, radius, float, BOTH) \
                P(class, prefix, refire2, float, SEC) \
                P(class, prefix, refire, float, BOTH) \