electro midaircombo_speed to preserve balance bug :P 757/head
authorMartin Taibr <taibr.martin@gmail.com>
Sat, 18 Jan 2020 14:25:04 +0000 (15:25 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Sat, 18 Jan 2020 14:25:04 +0000 (15:25 +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 c366f38..5cfa348 100644 (file)
@@ -196,6 +196,7 @@ 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_speed 2000
 set g_balance_electro_primary_midaircombo_teammate 1
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
index d88becf..f965981 100644 (file)
@@ -196,6 +196,7 @@ 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_speed 2000
 set g_balance_electro_primary_midaircombo_teammate 1
 set g_balance_electro_primary_radius 150
 set g_balance_electro_primary_refire 0.6
index cb875d2..6896f5f 100644 (file)
@@ -196,6 +196,7 @@ 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_speed 2000
 set g_balance_electro_primary_midaircombo_teammate 1
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
index 07d96f6..3ee6d90 100644 (file)
@@ -196,6 +196,7 @@ 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_speed 2000
 set g_balance_electro_primary_midaircombo_teammate 1
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
index a9d71f5..ec8029c 100644 (file)
@@ -196,6 +196,7 @@ 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_speed 2000
 set g_balance_electro_primary_midaircombo_teammate 1
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
index 23c8600..67cc55b 100644 (file)
@@ -196,6 +196,7 @@ 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_speed 2000
 set g_balance_electro_primary_midaircombo_teammate 1
 set g_balance_electro_primary_radius 100
 set g_balance_electro_primary_refire 0.6
index c170932..69ccc42 100644 (file)
@@ -175,9 +175,22 @@ void W_Electro_Bolt_Think(entity this)
                                        e.takedamage = DAMAGE_NO;
                                        e.classname = "electro_orb_chain";
 
-                                       // explode first orb immediately, other orbs will chain with delay
+                                       // Only first orb explosion uses midaircombo_speed, others use the normal combo_speed.
+                                       // This allows to avoid the delay on the first explosion which looks better
+                                       // (the bolt and orb should explode together because they interacted together)
+                                       // while keeping the chaining delay.
                                        setthink(e, W_Electro_ExplodeCombo);
-                                       e.nextthink = time;
+                                       e.nextthink =
+                                       (
+                                               time
+                                               +
+                                               (WEP_CVAR_PRI(electro, midaircombo_speed) ?
+                                                       (vlen(e.WarpZone_findradius_dist) / WEP_CVAR_PRI(electro, midaircombo_speed))
+                                                       :
+                                                       0
+                                               )
+                                       );
+
 
                                        ++found;
                                }
index c7ad6e9..4480812 100644 (file)
@@ -45,6 +45,7 @@ CLASS(Electro, Weapon)
                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_speed, float, PRI) \
                P(class, prefix, midaircombo_teammate, float, PRI) \
                P(class, prefix, radius, float, BOTH) \
                P(class, prefix, refire2, float, SEC) \