]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Electro combo over time: show another explosion effect when the ball disappears terencehill/electro_combo_over_time
authorterencehill <piuntn@gmail.com>
Wed, 9 Oct 2024 08:53:11 +0000 (10:53 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 9 Oct 2024 08:53:11 +0000 (10:53 +0200)
qcsrc/common/weapons/weapon/electro.qc

index 66ea172dcd2f7cce03af534ea148801f97278976..7594544bb9137c006b344b4c238c7bd862bbefca 100644 (file)
@@ -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)