]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix electro not leaving decals on all walls
authorterencehill <piuntn@gmail.com>
Tue, 13 Aug 2024 00:34:23 +0000 (02:34 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 13 Aug 2024 00:34:23 +0000 (02:34 +0200)
qcsrc/common/weapons/weapon/electro.qc

index 280267a9ad3de6368294cb332cc34a829c261720..684fa633ed3a2fd0e8b689e57d4a6b9a1c159f0c 100644 (file)
@@ -56,7 +56,8 @@ void W_Electro_ExplodeCombo(entity this)
        W_Electro_TriggerCombo(this.origin, WEP_CVAR(electro, combo_comboradius), this.realowner);
 
        this.event_damage = func_null;
-       this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
+       if (!this.velocity)
+               this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
 
        RadiusDamage(
                this,
@@ -86,7 +87,8 @@ void W_Electro_Explode(entity this, entity directhitentity)
 
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
-       this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
+       if (!this.velocity)
+               this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
 
        if(this.move_movetype == MOVETYPE_BOUNCE || this.classname == "electro_orb") // TODO: classname is more reliable anyway?
        {