From 0879504b65801fa2f5f46620f47f5f8c19a5c6d8 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Tue, 23 Jun 2009 11:24:52 +0000 Subject: [PATCH] --- reaction/cgame/cg_draw.c | 5 +++-- reaction/ta_ui/ui_main.c | 8 +------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/reaction/cgame/cg_draw.c b/reaction/cgame/cg_draw.c index 8453a1b4..368cfb0c 100644 --- a/reaction/cgame/cg_draw.c +++ b/reaction/cgame/cg_draw.c @@ -1995,9 +1995,10 @@ static void CG_DrawCrosshair(void) const float ZMC_MAX = 0.175f; float frac = (cg.refdef.fov_x - 10.f) / (90.f - 10.f); - float fCoord = ZMC_NORMAL * frac + ZMC_MAX * (1.f - frac); + float fCoordX = ZMC_NORMAL * frac + ZMC_MAX * (1.f - frac); + float fCoordY = fCoordX * cg.refdef.height / SCREEN_HEIGHT; - trap_R_DrawStretchPic(0, 0, cg.refdef.width, cg.refdef.height, fCoord, fCoord, 1.f-fCoord, 1.f-fCoord, cgs.media.zoomMask); + trap_R_DrawStretchPic(0, 0, cg.refdef.width, cg.refdef.height, fCoordX, fCoordY, 1.f - fCoordX, 1.f - fCoordY, cgs.media.zoomMask); } drawSSG = 1; diff --git a/reaction/ta_ui/ui_main.c b/reaction/ta_ui/ui_main.c index f3025a1e..ecdd50ee 100644 --- a/reaction/ta_ui/ui_main.c +++ b/reaction/ta_ui/ui_main.c @@ -3063,15 +3063,9 @@ static void UI_DrawCrosshair(rectDef_t * rect, float scale) float pt[2]; float mx, my; - vec4_t black = { 0, 0, 0, 1}; - pt[0] = rect->x; pt[1] = rect->y; - - UI_DrawAngledPic(pt[0], pt[1], rect->w, rect->h, rect->u, rect->v, black, - 0.f, 0.f, 1.f, 1.f, /*uiInfo.uiDC.Assets.crosshairShader[uiInfo.currentCrosshair]*/ uiInfo.uiDC.whiteShader); - mx = (rect->w - size) * 0.5f; my = (rect->h - size) * 0.5f; @@ -3079,7 +3073,7 @@ static void UI_DrawCrosshair(rectDef_t * rect, float scale) Vector2MA(pt, my, rect->v, pt); UI_DrawAngledPic(pt[0], pt[1], size, size, rect->u, rect->v, color, - 0.f, 0.f, 1.f, 1.f, /*uiInfo.uiDC.Assets.crosshairShader[uiInfo.currentCrosshair]*/ uiInfo.uiDC.whiteShader); + 0.f, 0.f, 1.f, 1.f, uiInfo.uiDC.Assets.crosshairShader[uiInfo.currentCrosshair]); } else UI_DrawHandlePic(rect->x + (rect->w - size) * 0.5f, rect->y + (rect->h - size) * 0.5f, size, size,