From: Mario Date: Sat, 4 Feb 2017 14:07:49 +0000 (+1000) Subject: Make it possible to turn players completely invisible with the invisible buff X-Git-Tag: xonotic-v0.8.2~248 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b3704b5f585b95408a566ee032d2e9acf6b1536d;p=xonotic%2Fxonotic-data.pk3dir.git Make it possible to turn players completely invisible with the invisible buff --- diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index 119829cba..87232ebc0 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -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)