]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 c366f381a5716e5c13af010aef24fba1510bd038..5cfa34882b2710471c8e0a44157dda9feff17eb5 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 d88becfbf62bf69fd394943cc50455380948fb3a..f9659814b3ea91d425b172095dbc9c264a2e5418 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 cb875d2aa3c26d5d9a4bafae7f185488b26a1766..6896f5f5e0be99131c379ea538b28a0ff7e3b252 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 07d96f6e83a81b2a25a40a2f1f796f2e7da29dfb..3ee6d9019719bdd0aa9f92e800ad4b77a0f82785 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 a9d71f5083398a907ad1cca119ed94c2f8f5c143..ec8029c74bf28647cae83bf57d806178f6120640 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 23c8600f5a8f57e8a95f0444e4fed2de3dd93c2d..67cc55b8d959dc47016375d681350ac7c9c76ee0 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 c1709322e44b14f30b2e84898efdb785ea213d21..69ccc4251bff69dbd7dacb70975cdf1966c62434 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 c7ad6e95106c07af6ff74155133dfdde3cd7562c..4480812207defe79dfddd925c4589c1a57f09ea7 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) \