From: Martin Taibr Date: Sat, 18 Jan 2020 14:25:04 +0000 (+0100) Subject: electro midaircombo_speed to preserve balance bug :P X-Git-Tag: xonotic-v0.8.5~1161^2~11^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F757%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git electro midaircombo_speed to preserve balance bug :P --- diff --git a/bal-wep-mario.cfg b/bal-wep-mario.cfg index c366f381a..5cfa34882 100644 --- a/bal-wep-mario.cfg +++ b/bal-wep-mario.cfg @@ -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 diff --git a/bal-wep-nexuiz25.cfg b/bal-wep-nexuiz25.cfg index d88becfbf..f9659814b 100644 --- a/bal-wep-nexuiz25.cfg +++ b/bal-wep-nexuiz25.cfg @@ -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 diff --git a/bal-wep-samual.cfg b/bal-wep-samual.cfg index cb875d2aa..6896f5f5e 100644 --- a/bal-wep-samual.cfg +++ b/bal-wep-samual.cfg @@ -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 diff --git a/bal-wep-testing.cfg b/bal-wep-testing.cfg index 07d96f6e8..3ee6d9019 100644 --- a/bal-wep-testing.cfg +++ b/bal-wep-testing.cfg @@ -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 diff --git a/bal-wep-xdf.cfg b/bal-wep-xdf.cfg index a9d71f508..ec8029c74 100644 --- a/bal-wep-xdf.cfg +++ b/bal-wep-xdf.cfg @@ -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 diff --git a/bal-wep-xonotic.cfg b/bal-wep-xonotic.cfg index 23c8600f5..67cc55b8d 100644 --- a/bal-wep-xonotic.cfg +++ b/bal-wep-xonotic.cfg @@ -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 diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index c1709322e..69ccc4251 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -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; } diff --git a/qcsrc/common/weapons/weapon/electro.qh b/qcsrc/common/weapons/weapon/electro.qh index c7ad6e951..448081220 100644 --- a/qcsrc/common/weapons/weapon/electro.qh +++ b/qcsrc/common/weapons/weapon/electro.qh @@ -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) \