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)
{