mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-23 12:42:36 +00:00
This commit is contained in:
parent
99c37b1334
commit
0879504b65
2 changed files with 4 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue