- Host_Error("R_DrawParticles: unknown particle orientation %i\n", orientation);
- m.vertex[0] = org[0] - right[0] - up[0];
- m.vertex[1] = org[1] - right[1] - up[1];
- m.vertex[2] = org[2] - right[2] - up[2];
- m.vertex[4] = org[0] - right[0] + up[0];
- m.vertex[5] = org[1] - right[1] + up[1];
- m.vertex[6] = org[2] - right[2] + up[2];
- m.vertex[8] = org[0] + right[0] + up[0];
- m.vertex[9] = org[1] + right[1] + up[1];
- m.vertex[10] = org[2] + right[2] + up[2];
- m.vertex[12] = org[0] + right[0] - up[0];
- m.vertex[13] = org[1] + right[1] - up[1];
- m.vertex[14] = org[2] + right[2] - up[2];
- tex = &particletexture[texnum];
- m.texcoords[0][0] = tex->s1;
- m.texcoords[0][1] = tex->t1;
- m.texcoords[0][2] = tex->s1;
- m.texcoords[0][3] = tex->t2;
- m.texcoords[0][4] = tex->s2;
- m.texcoords[0][5] = tex->t2;
- m.texcoords[0][6] = tex->s2;
- m.texcoords[0][7] = tex->t1;
- cr = p->color[0] * (1.0f / 255.0f);
- cg = p->color[1] * (1.0f / 255.0f);
- cb = p->color[2] * (1.0f / 255.0f);
- ca = p->alpha * (1.0f / 255.0f);
- if (fogenabled)
+ VectorVectors(p->vel2, right, up);
+ VectorScale(right, p->scalex, right);
+ VectorScale(up, p->scaley, up);
+ }
+ else
+ Host_Error("R_DrawParticles: unknown particle orientation %i\n", orientation);
+ varray_vertex[0] = org[0] - right[0] - up[0];
+ varray_vertex[1] = org[1] - right[1] - up[1];
+ varray_vertex[2] = org[2] - right[2] - up[2];
+ varray_vertex[4] = org[0] - right[0] + up[0];
+ varray_vertex[5] = org[1] - right[1] + up[1];
+ varray_vertex[6] = org[2] - right[2] + up[2];
+ varray_vertex[8] = org[0] + right[0] + up[0];
+ varray_vertex[9] = org[1] + right[1] + up[1];
+ varray_vertex[10] = org[2] + right[2] + up[2];
+ varray_vertex[12] = org[0] + right[0] - up[0];
+ varray_vertex[13] = org[1] + right[1] - up[1];
+ varray_vertex[14] = org[2] + right[2] - up[2];
+ tex = &particletexture[texnum];
+ varray_texcoord[0][0] = tex->s1;
+ varray_texcoord[0][1] = tex->t1;
+ varray_texcoord[0][2] = tex->s1;
+ varray_texcoord[0][3] = tex->t2;
+ varray_texcoord[0][4] = tex->s2;
+ varray_texcoord[0][5] = tex->t2;
+ varray_texcoord[0][6] = tex->s2;
+ varray_texcoord[0][7] = tex->t1;
+ cr = p->color[0] * (1.0f / 255.0f);
+ cg = p->color[1] * (1.0f / 255.0f);
+ cb = p->color[2] * (1.0f / 255.0f);
+ ca = p->alpha * (1.0f / 255.0f);
+ if (fogenabled)
+ {
+ VectorSubtract(org, r_origin, fogvec);
+ fog = exp(fogdensity/DotProduct(fogvec,fogvec));
+ ifog = 1 - fog;
+ cr = cr * ifog;
+ cg = cg * ifog;
+ cb = cb * ifog;
+ if (!additive)