#define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOSHADOW | EF_SELECTABLE | EF_TELEPORT_BIT)
float autocvar_cl_viewmodel_scale;
+float autocvar_cl_viewmodel_alpha;
bool autocvar_cl_bobmodel;
float autocvar_cl_bobmodel_speed;
if(!this.activeweapon || !autocvar_r_drawviewmodel)
return;
int mask = (intermission || (STAT(HEALTH) <= 0) || autocvar_chase_active) ? 0 : MASK_NORMAL;
- float a = this.alpha;
- static bool wasinvehicle;
+ float a = ((autocvar_cl_viewmodel_alpha) ? bound(-1, autocvar_cl_viewmodel_alpha, this.m_alpha) : this.m_alpha);
bool invehicle = player_localentnum > maxclients;
if (invehicle) a = -1;
- else if (wasinvehicle) a = 1;
- wasinvehicle = invehicle;
Weapon wep = this.activeweapon;
int c = entcs_GetClientColors(current_player);
vector g = weaponentity_glowmod(wep, NULL, c, this);
\
PROP(false, m_alpha, WEPENT_SET_NORMAL, \
{ WriteByte(chan, rint(bound(-1, 254 * this.m_alpha, 254) - -1)); }, \
- { (viewmodels[this.m_wepent_slot]).alpha = (ReadByte() + -1) / 254; }) \
+ { (viewmodels[this.m_wepent_slot]).m_alpha = (ReadByte() + -1) / 254; }) \
\
PROP(false, vortex_charge, WEPENT_SET_NORMAL, \
{ WriteByte(chan, this.vortex_charge * 255); }, \
seta cl_movement_errorcompensation 1 "try to compensate for prediction errors and reduce perceived lag"
seta cl_movement_intermissionrunning 0 "keep velocity after the match ends, players may appear to continue running while stationary"
+seta cl_viewmodel_alpha 0 "Maximum transparency of the view model, set to 0 to disable"
+
set debugdraw 0
set debugdraw_filter ""
set debugdraw_filterout ""