From 9ccc734f149a45ed41efaf6927eb2363f4f62a5d Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 9 Oct 2024 10:53:11 +0200 Subject: [PATCH] Electro combo over time: show another explosion effect when the ball disappears --- qcsrc/common/weapons/weapon/electro.qc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index 66ea172dc..7594544bb 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -55,12 +55,6 @@ float ExplodeOverTime_eff_interval; .float ltime2; void W_Electro_ExplodeComboThink(entity this) { - if(time >= this.ltime) - { - delete(this); - return; - } - this.nextthink = time; float damage = WEP_CVAR(WEP_ELECTRO, combo_damage) * PHYS_INPUT_TIMELENGTH; @@ -77,8 +71,18 @@ void W_Electro_ExplodeComboThink(entity this) else this.ltime2 += ExplodeOverTime_eff_interval; } + + if(time >= this.ltime) + this.projectiledeathtype &= ~HITTYPE_SPAM; + RadiusDamage(this, this.realowner, damage, edgedamage, WEP_CVAR(WEP_ELECTRO, combo_radius), NULL, NULL, 0, this.projectiledeathtype, this.weaponentity_fld, NULL); this.projectiledeathtype |= HITTYPE_SPAM; // ensure it doesn't spam its effect + + if(time >= this.ltime) + { + delete(this); + return; + } } void W_Electro_Orb_ExplodeOverTime(entity this) -- 2.39.2