]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Refactor combos over time to apply every frame instead of by a set interval
authorMario <mario.mario@y7mail.com>
Thu, 1 Aug 2024 04:38:14 +0000 (14:38 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 1 Aug 2024 04:38:14 +0000 (14:38 +1000)
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/electro.qh

index 1e33c033278cb56eb4ecc31dcc464d1b43334371..2858bde448e1c9ddb134240b4b1a06bd731cda83 100644 (file)
@@ -189,7 +189,6 @@ set g_balance_minelayer_weaponthrowable 1
 set g_balance_electro_combo_comboradius 300
 set g_balance_electro_combo_comboradius_thruwall 200
 set g_balance_electro_combo_damage 50
-set g_balance_electro_combo_damage_interval 0.05
 set g_balance_electro_combo_duration 1.5
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 0
index 42c60d205f2a7601813f68dba141c6d5dcb91533..ebc38b58c7e3669f06ab11a04ab87ff77431d762 100644 (file)
@@ -189,7 +189,6 @@ set g_balance_minelayer_weaponthrowable 1
 set g_balance_electro_combo_comboradius 0
 set g_balance_electro_combo_comboradius_thruwall 0
 set g_balance_electro_combo_damage 80
-set g_balance_electro_combo_damage_interval 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 200
index 80a90339b8914f430720560c1a482d172486ff51..f6168e334ca773a35c6e469fa4f16a8492e3ea81 100644 (file)
@@ -189,7 +189,6 @@ set g_balance_minelayer_weaponthrowable 1
 set g_balance_electro_combo_comboradius 300
 set g_balance_electro_combo_comboradius_thruwall 200
 set g_balance_electro_combo_damage 50
-set g_balance_electro_combo_damage_interval 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
index b0f3c62656fba02ec2d993e02529c64f5adff1b7..8d79b1898c3656d57e65b6bc691afe8bb7777267 100644 (file)
@@ -189,7 +189,6 @@ set g_balance_minelayer_weaponthrowable 1
 set g_balance_electro_combo_comboradius 275
 set g_balance_electro_combo_comboradius_thruwall 200
 set g_balance_electro_combo_damage 50
-set g_balance_electro_combo_damage_interval 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
index e3e7fbd90e640ddf2cae29e66fd47f0ef4e9151c..0f09484207cddaa570de97531e89bd5881d38a10 100644 (file)
@@ -189,7 +189,6 @@ set g_balance_minelayer_weaponthrowable 1
 set g_balance_electro_combo_comboradius 300
 set g_balance_electro_combo_comboradius_thruwall 200
 set g_balance_electro_combo_damage 50
-set g_balance_electro_combo_damage_interval 0.05
 set g_balance_electro_combo_duration 0
 set g_balance_electro_combo_edgedamage 25
 set g_balance_electro_combo_force 120
index cb8ea617b134f5bc1b06cc7b61e326203b4fd5ea..2071491486b76ef3e0bf43d61e3d656e2bcac390 100644 (file)
@@ -59,9 +59,12 @@ void W_Electro_ExplodeComboThink(entity this)
                return;
        }
 
-       this.nextthink = time + this.dmg_interval;
+       this.nextthink = time;
+
+       float damage = this.dmg * PHYS_INPUT_TIMELENGTH;
+       float edgedamage = this.dmg_edge * PHYS_INPUT_TIMELENGTH;
 
-       RadiusDamage(this, this.realowner, this.dmg, this.dmg_edge, this.dmg_radius, NULL, NULL, 0, this.projectiledeathtype, this.weaponentity_fld, NULL);
+       RadiusDamage(this, this.realowner, damage, edgedamage, this.dmg_radius, NULL, NULL, 0, this.projectiledeathtype, this.weaponentity_fld, NULL);
        this.projectiledeathtype |= HITTYPE_BOUNCE; // ensure it doesn't spam its effect
 }
 
@@ -81,11 +84,8 @@ void W_Electro_ExplodeCombo(entity this)
 
                setthink(this, W_Electro_ExplodeComboThink);
                this.nextthink = time;
-               this.dmg_interval = WEP_CVAR(electro, combo_damage_interval);
-               if(!this.dmg_interval)
-                       this.dmg_interval = PHYS_INPUT_TIMELENGTH;
-               this.dmg = WEP_CVAR(electro, combo_damage) * this.dmg_interval;
-               this.dmg_edge = WEP_CVAR(electro, combo_edgedamage) * this.dmg_interval;
+               this.dmg = WEP_CVAR(electro, combo_damage);
+               this.dmg_edge = WEP_CVAR(electro, combo_edgedamage);
                this.dmg_radius = WEP_CVAR(electro, combo_radius);
                this.dmg_duration = WEP_CVAR(electro, combo_duration);
                this.teleport_time = time;
index f8e53ee759bc5776c82c0327b9b3ec53ea349679..cdb2f10e0a5bd6cddc59f62167477b17ce25a940 100644 (file)
@@ -29,7 +29,6 @@ CLASS(Electro, Weapon)
                P(class, prefix, combo_comboradius, float, NONE) \
                P(class, prefix, combo_comboradius_thruwall, float, NONE) \
                P(class, prefix, combo_damage, float, NONE) \
-               P(class, prefix, combo_damage_interval, float, NONE) \
                P(class, prefix, combo_duration, float, NONE) \
                P(class, prefix, combo_edgedamage, float, NONE) \
                P(class, prefix, combo_force, float, NONE) \
@@ -85,7 +84,6 @@ SPAWNFUNC_WEAPON(weapon_electro, WEP_ELECTRO)
 .float dmg_radius;
 .float dmg_duration;
 .float dmg_last;
-.float dmg_interval;
 
 IntrusiveList LimitedElectroBallRubbleList;
 .float electro_count;