From: Mario Date: Sat, 13 Oct 2018 06:31:17 +0000 (+1000) Subject: Allow electro orbs to stick to entities if touchexplode is off X-Git-Tag: xonotic-v0.8.5~1778 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e74179ccd4e946e85956f5935ab0a8bfbe55b39a;p=xonotic%2Fxonotic-data.pk3dir.git Allow electro orbs to stick to entities if touchexplode is off --- diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index 9988e55b8..e22b5e941 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -285,8 +285,8 @@ void W_Electro_Orb_Stick(entity this, entity to) void W_Electro_Orb_Touch(entity this, entity toucher) { PROJECTILE_TOUCH(this, toucher); - if(toucher.takedamage == DAMAGE_AIM) - { if(WEP_CVAR_SEC(electro, touchexplode)) { W_Electro_Explode(this, toucher); } } + if(toucher.takedamage == DAMAGE_AIM && WEP_CVAR_SEC(electro, touchexplode)) + { W_Electro_Explode(this, toucher); } else if(toucher.owner != this.owner && toucher.classname != this.classname) // don't stick to player's other projectiles! { //UpdateCSQCProjectile(this);