]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 9988e55b8ab2865efa270220e925205ec389a1e4..e22b5e941270b7f2757b407675b6db7c6ead44a5 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);