#include <lib/warpzone/common.qh>
float autocvar_cl_viewmodel_alpha = 1;
-float autocvar_cl_viewmodel_alpha_while_invisible;
+float autocvar_cl_viewmodel_alpha_min;
bool autocvar_cl_bobmodel;
float autocvar_cl_bobmodel_speed;
{
int mask = (intermission || (STAT(HEALTH) <= 0) || autocvar_chase_active) ? 0 : MASK_NORMAL;
float a;
- if (this.m_alpha == 1) // check visibility
- a = bound(-1, autocvar_cl_viewmodel_alpha, this.m_alpha);
+ if (autocvar_cl_viewmodel_alpha_min)
+ a = bound(autocvar_cl_viewmodel_alpha_min, this.m_alpha, autocvar_cl_viewmodel_alpha);
else
- if (!autocvar_cl_viewmodel_alpha_while_invisible) // check if unset 0
- a = bound(-1, autocvar_cl_viewmodel_alpha, this.m_alpha);
- else
- a = bound(-1, autocvar_cl_viewmodel_alpha_while_invisible, 1);
+ a = autocvar_cl_viewmodel_alpha;
+ a = bound(-1, a, this.m_alpha);
int wepskin = this.m_skin;
bool invehicle = player_localentnum > maxclients;
if (invehicle) a = -1;
seta cl_movement_intermissionrunning 0 "keep velocity after the match ends, players may appear to continue running while stationary"
seta cl_viewmodel_alpha 1 "Maximum opacity of the viewmodel, use a value between 0 and 1"
-seta cl_viewmodel_alpha_while_invisible 0 "Overrides the opacity of the viewmodel if invisible; -1 forces invisibility, 0 disables this override, and any value between 0 and 1 enables it with the value as opacity"
+seta cl_viewmodel_alpha_min 0 "Minimum opacity of the viewmodel, use a value between 0 and 1"
set debugdraw 0
set debugdraw_filter ""