mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Remove scaling from R_RunParticleEffect, and make blood puff size variable in qw.
This commit is contained in:
parent
2941c07b0a
commit
35b767cd21
3 changed files with 10 additions and 31 deletions
|
@ -254,8 +254,9 @@ R_BloodPuff (vec3_t org, int count)
|
|||
if (numparticles >= r_maxparticles)
|
||||
return;
|
||||
|
||||
particle_new (pt_bloodcloud, part_tex_smoke, org, 9,
|
||||
vec3_origin, r_realtime + 99, 70 + (rand () & 3), 128);
|
||||
particle_new (pt_bloodcloud, part_tex_smoke, org, count / 4,
|
||||
vec3_origin, r_realtime + 99, 70 + (rand () & 3), 128 +
|
||||
((count / 20) % 128));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -270,7 +271,7 @@ R_RunPuffEffect (vec3_t org, particle_effect_t type, byte count)
|
|||
{
|
||||
int scale = 16;
|
||||
|
||||
if (count > 6)
|
||||
if (count > 120)
|
||||
scale = 24;
|
||||
R_RunSparkEffect (org, count / 2, scale);
|
||||
}
|
||||
|
@ -279,7 +280,7 @@ R_RunPuffEffect (vec3_t org, particle_effect_t type, byte count)
|
|||
R_BloodPuff (org, count);
|
||||
break;
|
||||
case PE_LIGHTNINGBLOOD:
|
||||
R_BloodPuff (org, 5 + (rand () & 1));
|
||||
R_BloodPuff (org, 50);
|
||||
count = 4 + (rand () % 5);
|
||||
|
||||
if (numparticles >= r_maxparticles)
|
||||
|
@ -303,24 +304,17 @@ R_RunPuffEffect (vec3_t org, particle_effect_t type, byte count)
|
|||
void
|
||||
R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
||||
{
|
||||
int scale, i, j;
|
||||
int i, j;
|
||||
|
||||
if (numparticles >= r_maxparticles)
|
||||
return;
|
||||
|
||||
if (count > 130)
|
||||
scale = 3;
|
||||
else if (count > 20)
|
||||
scale = 2;
|
||||
else
|
||||
scale = 1;
|
||||
|
||||
if (numparticles + count >= r_maxparticles)
|
||||
count = r_maxparticles - numparticles;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
org[j] += scale * ((rand () & 15) - 8);
|
||||
org[j] += ((rand () & 15) - 8);
|
||||
}
|
||||
particle_new (pt_slowgrav, part_tex_dot, org, 1.5, dir,
|
||||
(r_realtime + 0.1 * (rand () % 5)),
|
||||
|
|
|
@ -269,18 +269,10 @@ R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
|||
{
|
||||
int i, j;
|
||||
particle_t *p;
|
||||
int scale;
|
||||
|
||||
if (!r_particles->int_val)
|
||||
return;
|
||||
|
||||
if (count > 130)
|
||||
scale = 3;
|
||||
else if (count > 20)
|
||||
scale = 2;
|
||||
else
|
||||
scale = 1;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
if (!free_particles)
|
||||
return;
|
||||
|
@ -293,7 +285,7 @@ R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
|||
p->color = (color & ~7) + (rand () & 7);
|
||||
p->type = pt_grav;
|
||||
for (j = 0; j < 3; j++) {
|
||||
p->org[j] = org[j] + scale * ((rand () & 15) - 8);
|
||||
p->org[j] = org[j] + ((rand () & 15) - 8);
|
||||
p->vel[j] = dir[j]; // + (rand()%300)-150;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -267,19 +267,12 @@ R_BlobExplosion (vec3_t org)
|
|||
void
|
||||
R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
||||
{
|
||||
int scale, i, j;
|
||||
int i, j;
|
||||
particle_t *p;
|
||||
|
||||
if (!r_particles->int_val)
|
||||
return;
|
||||
|
||||
if (count > 130)
|
||||
scale = 3;
|
||||
else if (count > 20)
|
||||
scale = 2;
|
||||
else
|
||||
scale = 1;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
if (!free_particles)
|
||||
return;
|
||||
|
@ -292,7 +285,7 @@ R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
|
|||
p->color = (color & ~7) + (rand () & 7);
|
||||
p->type = pt_slowgrav;
|
||||
for (j = 0; j < 3; j++) {
|
||||
p->org[j] = org[j] + scale * ((rand () & 15) - 8);
|
||||
p->org[j] = org[j] + ((rand () & 15) - 8);
|
||||
p->vel[j] = dir[j]; // + (rand()%300)-150;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue