]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make it possible to turn players completely invisible with the invisible buff
authorMario <mario@smbclan.net>
Sat, 4 Feb 2017 14:07:49 +0000 (00:07 +1000)
committerMario <mario@smbclan.net>
Sat, 4 Feb 2017 14:07:49 +0000 (00:07 +1000)
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc

index 119829cbad009c6d8f33f024ebca4c77e6c2ea36..87232ebc01476d31a5ab7a0cf6ca1f6373f48b97 100644 (file)
@@ -875,8 +875,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
        }
 
        if((player.buffs & BUFF_INVISIBLE.m_itemid) && (player.oldbuffs & BUFF_INVISIBLE.m_itemid))
-       if(player.alpha != autocvar_g_buffs_invisible_alpha)
-               player.alpha = autocvar_g_buffs_invisible_alpha; // powerups reset alpha, so we must enforce this (TODO)
+               player.alpha = ((autocvar_g_buffs_invisible_alpha) ? autocvar_g_buffs_invisible_alpha : -1); // powerups reset alpha, so we must enforce this (TODO)
 
        if(player.buffs & BUFF_MEDIC.m_itemid)
        if(time >= player.buff_medic_healtime)