From: Mario Date: Sat, 4 Feb 2017 14:23:45 +0000 (+1000) Subject: Fix up the handling of invisibility buff, so as to not interfere much with the invisi... X-Git-Tag: xonotic-v0.8.2~246 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=45d8d82e25fb87b5f04df84272ae8276ffb30c6f;p=xonotic%2Fxonotic-data.pk3dir.git Fix up the handling of invisibility buff, so as to not interfere much with the invisibility powerup in instagib, also fix cloaked mode --- diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index 87232ebc0..a9dd6574d 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -932,14 +932,19 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink) BUFF_ONADD(BUFF_INVISIBLE) { if(time < player.strength_finished && g_instagib) - player.alpha = autocvar_g_instagib_invis_alpha; + player.buff_invisible_prev_alpha = default_player_alpha; // we don't want to save the powerup's alpha, as player may lose the powerup while holding the buff else - player.alpha = player.buff_invisible_prev_alpha; + player.buff_invisible_prev_alpha = player.alpha; player.alpha = autocvar_g_buffs_invisible_alpha; } BUFF_ONREM(BUFF_INVISIBLE) - player.alpha = player.buff_invisible_prev_alpha; + { + if(time < player.strength_finished && g_instagib) + player.alpha = autocvar_g_instagib_invis_alpha; + else + player.alpha = player.buff_invisible_prev_alpha; + } BUFF_ONADD(BUFF_FLIGHT) {