R_Mesh_Matrix(&r_identitymatrix);
R_Mesh_State(&m);
- varray_color[0] = varray_color[4] = varray_color[8] = varray_color[12] = cr * r_colorscale;
- varray_color[1] = varray_color[5] = varray_color[9] = varray_color[13] = cg * r_colorscale;
- varray_color[2] = varray_color[6] = varray_color[10] = varray_color[14] = cb * r_colorscale;
- varray_color[3] = varray_color[7] = varray_color[11] = varray_color[15] = ca;
- varray_texcoord[0][0] = 0;
- varray_texcoord[0][1] = 0;
- varray_texcoord[0][2] = 0;
- varray_texcoord[0][3] = 1;
- varray_texcoord[0][4] = 1;
- varray_texcoord[0][5] = 1;
- varray_texcoord[0][6] = 1;
- varray_texcoord[0][7] = 0;
+ GL_Color(cr * r_colorscale, cg * r_colorscale, cb * r_colorscale, ca);
+ varray_texcoord[0][ 0] = 0;varray_texcoord[0][ 1] = 0;
+ varray_texcoord[0][ 4] = 0;varray_texcoord[0][ 5] = 1;
+ varray_texcoord[0][ 8] = 1;varray_texcoord[0][ 9] = 1;
+ varray_texcoord[0][12] = 1;varray_texcoord[0][13] = 0;
varray_vertex[0] = origin[0] - vright[0] * scale - vup[0] * scale;
varray_vertex[1] = origin[1] - vright[1] * scale - vup[1] * scale;
varray_vertex[2] = origin[2] - vright[2] * scale - vup[2] * scale;
}
else
i = 15;
- color = (qbyte *) &d_8to24table[i];
+ color = (qbyte *) &palette_complete[i];
if (crosshair_flashspeed.value >= 0.01f)
base = (sin(realtime * crosshair_flashspeed.value * (M_PI*2.0f)) * crosshair_flashrange.value);
else
return;
if (!cl.viewentity || !cl_entities[cl.viewentity].state_current.active)
return;
- pic = Draw_CachePic(va("gfx/crosshair%i.tga", num + 1));
+ pic = Draw_CachePic(va("gfx/crosshair%i.tga", num));
if (!pic)
return;
R_GetCrosshairColor(color);
-
+
// trace the shot path up to a certain distance
VectorCopy(cl_entities[cl.viewentity].render.origin, v1);
v1[2] += 16; // HACK: this depends on the QC
-
+
// get the forward vector for the gun (not the view)
AngleVectors(cl.viewangles, v2, NULL, NULL);
//VectorCopy(r_origin, v1);
num = crosshair.integer;
if (num < 1 || num > NUMCROSSHAIRS || cl.intermission)
return;
- R_GetCrosshairColor(color);
- pic = Draw_CachePic(va("gfx/crosshair%i.tga", num + 1));
+ if (!cl.viewentity || !cl_entities[cl.viewentity].state_current.active)
+ return;
+ pic = Draw_CachePic(va("gfx/crosshair%i.tga", num));
if (pic)
+ {
+ R_GetCrosshairColor(color);
DrawQ_Pic((vid.conwidth - pic->width * crosshair_size.value) * 0.5f, (vid.conheight - pic->height * crosshair_size.value) * 0.5f, pic->name, pic->width * crosshair_size.value, pic->height * crosshair_size.value, color[0], color[1], color[2], color[3], 0);
+ }
}