float f, i, j;
vector v;
if(!scoreboard_active && !camera_active && intermission != 2 && !STAT(GAME_STOPPED) &&
- spectatee_status != -1 && !csqcplayer.viewloc && !MUTATOR_CALLHOOK(DrawCrosshair) &&
+ spectatee_status != -1 && (!csqcplayer.viewloc || (!spectatee_status && (csqcplayer.viewloc.spawnflags & VIEWLOC_FREEAIM))) && !MUTATOR_CALLHOOK(DrawCrosshair) &&
!HUD_MinigameMenu_IsOpened() )
{
if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
float shottype;
// wcross_origin = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
- wcross_origin = project_3d_to_2d(view_origin + max_shot_distance * view_forward);
+ if(csqcplayer.viewloc && (csqcplayer.viewloc.spawnflags & VIEWLOC_FREEAIM))
+ wcross_origin = viewloc_mousepos;
+ else
+ wcross_origin = project_3d_to_2d(view_origin + max_shot_distance * view_forward);
wcross_origin.z = 0;
if(autocvar_crosshair_hittest)
{
viewloc_mousepos.x = bound(0, viewloc_mousepos.x, vid_conwidth);
viewloc_mousepos.y = bound(0, viewloc_mousepos.y, vid_conheight);
- float cursor_alpha = 1 - autocvar__menu_alpha;
- draw_cursor(viewloc_mousepos, '0.5 0.5 0', "/cursor_move", '1 1 1', cursor_alpha);
+ //float cursor_alpha = 1 - autocvar__menu_alpha;
+ //draw_cursor(viewloc_mousepos, '0.5 0.5 0', "/cursor_move", '1 1 1', cursor_alpha);
}
bool ov_enabled;
} else {
vector mpos = CursorToWorldCoord(viewloc_mousepos);
mpos.x = view.origin.x; // replace the cursor's x position with the player's
- view_angle = aim_vec(view.origin, mpos); // get new angles
+ view_angle = aim_vec(view.origin + view.view_ofs, mpos); // get new angles
}
view.angles_y = view_angle.y;
setproperty(VF_CL_VIEWANGLES, view_angle);