mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Tweak particle effects extensively. Grenades and blood far cheaper, and better looking.
This commit is contained in:
parent
9bdc1f02c4
commit
0c00970ae1
2 changed files with 17 additions and 18 deletions
|
@ -484,56 +484,55 @@ R_RocketTrail (int type, entity_t *ent)
|
||||||
pdie = cl.time + 2;
|
pdie = cl.time + 2;
|
||||||
ptype = pt_static;
|
ptype = pt_static;
|
||||||
ptex = part_tex_dot;
|
ptex = part_tex_dot;
|
||||||
pcolor = 0;
|
|
||||||
pscale = .75;
|
|
||||||
palpha = 255;
|
palpha = 255;
|
||||||
dist = 1;
|
pcolor = 0;
|
||||||
|
pscale = 6;
|
||||||
|
dist = 40;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0: // rocket trail
|
case 0: // rocket trail
|
||||||
dist = 40;
|
|
||||||
pdie = cl.time + 60;
|
pdie = cl.time + 60;
|
||||||
ptype = pt_smokering;
|
ptype = pt_smokering;
|
||||||
pscale = lhrandom (10, 15);
|
pscale = lhrandom (9, 12);
|
||||||
// Misty-chan: Temporary easter egg
|
// Misty-chan: Temporary easter egg
|
||||||
pcolor = (rand () & 255);
|
pcolor = (rand () & 255);
|
||||||
// pcolor = (rand () & 3) + 12;
|
// pcolor = (rand () & 3) + 12;
|
||||||
palpha = 220 + (rand () & 31);
|
palpha = 128 + (rand () & 31);
|
||||||
VectorVectors(vec, right, up);
|
VectorVectors(vec, right, up);
|
||||||
VectorCopy (ent->old_origin, porg);
|
VectorCopy (ent->old_origin, porg);
|
||||||
ptex = part_tex_smoke_ring[rand () & 7];
|
ptex = part_tex_smoke_ring[rand () & 7];
|
||||||
break;
|
break;
|
||||||
case 1: // grenade trail
|
case 1: // grenade trail
|
||||||
dist = 4;
|
|
||||||
pdie = cl.time + 1;
|
|
||||||
ptype = pt_smoke;
|
ptype = pt_smoke;
|
||||||
pscale = lhrandom (6, 9);
|
pscale = lhrandom (6, 9);
|
||||||
// Misty-chan: Temporary easter egg.
|
// Misty-chan: Temporary easter egg.
|
||||||
pcolor = (rand () & 255);
|
pcolor = (rand () & 255);
|
||||||
// pcolor = (rand () & 3) + 3;
|
// pcolor = (rand () & 2);
|
||||||
palpha = 48 + (rand () & 31);
|
palpha = 128 + (rand () & 31);
|
||||||
VectorCopy (ent->old_origin, porg);
|
VectorCopy (ent->old_origin, porg);
|
||||||
ptex = part_tex_smoke[rand () & 7];
|
ptex = part_tex_smoke[rand () & 7];
|
||||||
break;
|
break;
|
||||||
case 4: // slight blood
|
|
||||||
dist = 4;
|
|
||||||
case 2: // blood
|
case 2: // blood
|
||||||
dist = 4;
|
pscale = 12;
|
||||||
|
case 4: // slight blood
|
||||||
|
pscale += lhrandom (0, 3);
|
||||||
|
ptex = part_tex_smoke[rand () & 7];
|
||||||
pcolor = 68 + (rand () & 3);
|
pcolor = 68 + (rand () & 3);
|
||||||
for (j = 0; j < 3; j++) {
|
for (j = 0; j < 3; j++) {
|
||||||
pvel[j] = (rand () & 15) - 8;
|
pvel[j] = lhrandom (-3, 3) * type;
|
||||||
porg[j] = ent->old_origin[j] + ((rand () % 3) - 2);
|
porg[j] = ent->old_origin[j] + lhrandom (-1.5, 1.5);
|
||||||
}
|
}
|
||||||
ptype = pt_grav;
|
ptype = pt_grav;
|
||||||
break;
|
break;
|
||||||
case 6: // voor trail
|
case 6: // voor trail
|
||||||
|
// Use smoke ring effects here, once merged with nq? --Despair
|
||||||
dist = 3;
|
dist = 3;
|
||||||
pcolor = 9 * 16 + 8 + (rand () & 3);
|
pcolor = 9 * 16 + 8 + (rand () & 3);
|
||||||
ptype = pt_static;
|
ptype = pt_static;
|
||||||
pscale = lhrandom (.75, 1.5);
|
pscale = lhrandom (.75, 1.5);
|
||||||
pdie = cl.time + 0.3;
|
pdie = cl.time + 0.3;
|
||||||
for (j = 0; j < 3; j++)
|
for (j = 0; j < 3; j++)
|
||||||
porg[j] = ent->old_origin[j] + ((rand () & 15) - 8);
|
porg[j] = ent->old_origin[j] + lhrandom (-8, 8);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
case 5: // tracer
|
case 5: // tracer
|
||||||
|
|
|
@ -137,7 +137,7 @@ GDT_InitSmokeParticleTexture (void)
|
||||||
c = 255 - (dx*dx + dy2);
|
c = 255 - (dx*dx + dy2);
|
||||||
if (c < 1)
|
if (c < 1)
|
||||||
c = 0;
|
c = 0;
|
||||||
d = (noise1[y][x] + noise2[y][x]) / 3;
|
d = (noise1[y][x] + noise2[y][x]) / 2;
|
||||||
if (d > 0) {
|
if (d > 0) {
|
||||||
data[y][x][0] = 255;
|
data[y][x][0] = 255;
|
||||||
data[y][x][1] = (d * c)/255;
|
data[y][x][1] = (d * c)/255;
|
||||||
|
@ -180,7 +180,7 @@ GDT_InitSmokeRingParticleTexture (void)
|
||||||
//b = ((c / 255) * (c2 / 255)) * 512;
|
//b = ((c / 255) * (c2 / 255)) * 512;
|
||||||
b = (c * c2) * 512 / (255*255);
|
b = (c * c2) * 512 / (255*255);
|
||||||
if (b < 1) b = 0;
|
if (b < 1) b = 0;
|
||||||
d = (noise1[y][x] + noise2[y][x]) / 3;
|
d = (noise1[y][x] + noise2[y][x]) / 2;
|
||||||
if (d > 0) {
|
if (d > 0) {
|
||||||
data[y][x][0] = 255;
|
data[y][x][0] = 255;
|
||||||
data[y][x][1] = (d * b)/255;
|
data[y][x][1] = (d * b)/255;
|
||||||
|
|
Loading…
Reference in a new issue