Don't draw crosshair if centerstring
Posted: Mon Jun 23, 2014 6:03 am
Quicky tutorial shows how to not draw a crosshair if there is centerprint that is going to print.
FitzQuake implementation: Add the yellow ...
FitzQuake implementation: Add the yellow ...
Untested. Worst tutorial ever.gl_screen.c wrote:/*
==============
SCR_DrawCrosshair -- johnfitz
==============
*/
void SCR_DrawCrosshair (void)
{
qboolean will_draw_centerstring = !((scr_centertime_off - host_frametime <=0 && !cl.intermission) || key_dest != key_game || cl.paused);
if (will_draw_centerstring)
return; // Centerprint is going to print, so exit out and don't draw.
if (!crosshair.value)
return;
GL_SetCanvas (CANVAS_CROSSHAIR);
Draw_Character (-4, -4, '+'); //0,0 is center of viewport
}