Allow electro orbs to stick to entities if touchexplode is off
authorMario <mario@smbclan.net>
Sat, 13 Oct 2018 06:31:17 +0000 (16:31 +1000)
committerMario <mario@smbclan.net>
Sat, 13 Oct 2018 06:31:17 +0000 (16:31 +1000)
qcsrc/common/weapons/weapon/electro.qc

index 9988e55..e22b5e9 100644 (file)
@@ -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);