Angled crosshair

This commit is contained in:
Andrei Drexler 2009-06-22 22:20:37 +00:00
parent 9ccb150073
commit 76965e1168

View file

@ -3046,7 +3046,12 @@ static void UI_DrawCrosshair(rectDef_t * rect, float scale, vec4_t color)
uiInfo.currentCrosshair = 0; uiInfo.currentCrosshair = 0;
} }
//Makro - fixing bug that draws a crosshair even if cg_drawcrosshair is 0 //Makro - fixing bug that draws a crosshair even if cg_drawcrosshair is 0
if (uiInfo.currentCrosshair != 0) { if (uiInfo.currentCrosshair != 0)
{
if (rect->hasVectors)
UI_DrawAngledPic(rect->x, rect->y - rect->h, rect->w, rect->h, rect->u, rect->v, color,
0.f, 0.f, 1.f, 1.f, uiInfo.uiDC.Assets.crosshairShader[uiInfo.currentCrosshair]);
else
UI_DrawHandlePic(rect->x, rect->y - rect->h, rect->w, rect->h, UI_DrawHandlePic(rect->x, rect->y - rect->h, rect->w, rect->h,
uiInfo.uiDC.Assets.crosshairShader[uiInfo.currentCrosshair]); uiInfo.uiDC.Assets.crosshairShader[uiInfo.currentCrosshair]);
} }