From: terencehill Date: Wed, 9 Oct 2024 08:53:11 +0000 (+0200) Subject: Electro combo over time: show another explosion effect when the ball disappears X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9ccc734f149a45ed41efaf6927eb2363f4f62a5d;p=xonotic%2Fxonotic-data.pk3dir.git Electro combo over time: show another explosion effect when the ball disappears --- 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)