From: terencehill Date: Tue, 13 Aug 2024 00:34:23 +0000 (+0200) Subject: Fix electro not leaving decals on all walls X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=98340dc3b738a2ad91576fb58e0b83d7995da0ea;p=xonotic%2Fxonotic-data.pk3dir.git Fix electro not leaving decals on all walls --- diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index 280267a9a..684fa633e 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -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? {