+ R_Mesh_Matrix(&ent->matrix);
+ R_Mesh_State(&m);
+
+ element[ 0] = 5;element[ 1] = 2;element[ 2] = 0;
+ element[ 3] = 5;element[ 4] = 1;element[ 5] = 2;
+ element[ 6] = 5;element[ 7] = 0;element[ 8] = 3;
+ element[ 9] = 5;element[10] = 3;element[11] = 1;
+ element[12] = 0;element[13] = 2;element[14] = 4;
+ element[15] = 2;element[16] = 1;element[17] = 4;
+ element[18] = 3;element[19] = 0;element[20] = 4;
+ element[21] = 1;element[22] = 3;element[23] = 4;
+ varray_vertex[ 0] = -16;varray_vertex[ 1] = 0;varray_vertex[ 2] = 0;
+ varray_vertex[ 4] = 16;varray_vertex[ 5] = 0;varray_vertex[ 6] = 0;
+ varray_vertex[ 8] = 0;varray_vertex[ 9] = -16;varray_vertex[10] = 0;
+ varray_vertex[12] = 0;varray_vertex[13] = 16;varray_vertex[14] = 0;
+ varray_vertex[16] = 0;varray_vertex[17] = 0;varray_vertex[18] = -16;
+ varray_vertex[20] = 0;varray_vertex[21] = 0;varray_vertex[22] = 16;
+ varray_color[ 0] = 0.00f;varray_color[ 1] = 0.00f;varray_color[ 2] = 0.50f;varray_color[ 3] = ent->alpha;
+ varray_color[ 4] = 0.00f;varray_color[ 5] = 0.00f;varray_color[ 6] = 0.50f;varray_color[ 7] = ent->alpha;
+ varray_color[ 8] = 0.00f;varray_color[ 9] = 0.50f;varray_color[10] = 0.00f;varray_color[11] = ent->alpha;
+ varray_color[12] = 0.00f;varray_color[13] = 0.50f;varray_color[14] = 0.00f;varray_color[15] = ent->alpha;
+ varray_color[16] = 0.50f;varray_color[17] = 0.00f;varray_color[18] = 0.00f;varray_color[19] = ent->alpha;
+ varray_color[20] = 0.50f;varray_color[21] = 0.00f;varray_color[22] = 0.00f;varray_color[23] = ent->alpha;
+ if (fogenabled)
+ {
+ VectorSubtract(ent->origin, r_origin, diff);
+ f2 = exp(fogdensity/DotProduct(diff, diff));
+ f1 = 1 - f2;
+ for (i = 0, c = varray_color;i < 6;i++, c += 4)
+ {
+ c[0] = (c[0] * f1 + fogcolor[0] * f2) * r_colorscale;
+ c[1] = (c[1] * f1 + fogcolor[1] * f2) * r_colorscale;
+ c[2] = (c[2] * f1 + fogcolor[2] * f2) * r_colorscale;
+ }
+ }
+ else
+ {
+ for (i = 0, c = varray_color;i < 6;i++, c += 4)
+ {
+ c[0] *= r_colorscale;
+ c[1] *= r_colorscale;
+ c[2] *= r_colorscale;
+ }
+ }
+ R_Mesh_Draw(6, 8, element);
+}