#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);
vector pos = view_origin;
vector dir = view_forward;
+ makevectors(((autocvar_chase_active) ? warpzone_save_view_angles : view_angles));
+ pos += v_right * -wepent.movedir.y
+ + v_up * wepent.movedir.z;
+
if (wepent.angles_held_status)
{
makevectors(wepent.angles_held);
}
else return true;
}
+ if (spectatee_status > 0 && autocvar_cl_eventchase_spectated_change
+ && time <= spectatee_status_changed_time + 0.5)
+ return true;
}
return false;
}
//draw_cursor(viewloc_mousepos, '0.5 0.5 0', "/cursor_move", '1 1 1', cursor_alpha);
}
-float mouse_over_panel;
-void HUD_Draw_Mouse()
+void HUD_Cursor_Show()
{
float cursor_alpha = 1 - autocvar__menu_alpha;
- if(!mouse_over_panel)
+ if(cursor_type == CURSOR_NORMAL)
draw_cursor_normal(mousepos, '1 1 1', cursor_alpha);
- else if(mouse_over_panel == 1)
+ else if(cursor_type == CURSOR_MOVE)
draw_cursor(mousepos, '0.5 0.5 0', "/cursor_move", '1 1 1', cursor_alpha);
- else if(mouse_over_panel == 2)
+ else if(cursor_type == CURSOR_RESIZE)
draw_cursor(mousepos, '0.5 0.5 0', "/cursor_resize", '1 1 1', cursor_alpha);
- else
+ else if(cursor_type == CURSOR_RESIZE2)
draw_cursor(mousepos, '0.5 0.5 0', "/cursor_resize2", '1 1 1', cursor_alpha);
}
if(autocvar__menu_alpha == 1)
return;
- if(!HUD_WouldShowCursor())
+ if(!cursor_active)
{
if(player.viewloc && (player.viewloc.spawnflags & VIEWLOC_FREEAIM))
ViewLocation_Mouse(); // NOTE: doesn't use cursormode
prevMouseClicked = mouseClicked;
- HUD_Draw_Mouse();
+ HUD_Cursor_Show();
}
bool ov_enabled;