gl_particles added - disable it to make particles not happen

This commit is contained in:
Joseph Carter 2000-06-20 15:31:29 +00:00
parent f703748ee7
commit 2693901bd1
4 changed files with 31 additions and 6 deletions

View file

@ -208,6 +208,7 @@ extern cvar_t *gl_keeptjunctions;
extern cvar_t *gl_reporttjunctions;
extern cvar_t *gl_flashblend;
extern cvar_t *gl_nocolors;
extern cvar_t *gl_particles;
extern int gl_lightmap_format;
extern int gl_solid_format;

View file

@ -179,7 +179,10 @@ void R_ParticleExplosion (vec3_t org)
{
int i, j;
particle_t *p;
if (!gl_particles->value)
return;
for (i=0 ; i<1024 ; i++)
{
if (!free_particles)
@ -224,6 +227,9 @@ void R_BlobExplosion (vec3_t org)
int i, j;
particle_t *p;
if (!gl_particles->value)
return;
for (i=0 ; i<1024 ; i++)
{
if (!free_particles)
@ -270,6 +276,9 @@ void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
particle_t *p;
int scale;
if (!gl_particles->value)
return;
if (count > 130)
scale = 3;
else if (count > 20)
@ -311,6 +320,9 @@ void R_LavaSplash (vec3_t org)
float vel;
vec3_t dir;
if (!gl_particles->value)
return;
for (i=-16 ; i<16 ; i++)
for (j=-16 ; j<16 ; j++)
for (k=0 ; k<1 ; k++)
@ -353,6 +365,9 @@ void R_TeleportSplash (vec3_t org)
float vel;
vec3_t dir;
if (!gl_particles->value)
return;
for (i=-16 ; i<16 ; i+=4)
for (j=-16 ; j<16 ; j+=4)
for (k=-24 ; k<32 ; k+=4)
@ -389,6 +404,12 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
int j;
particle_t *p;
if (type == 0)
R_AddFire (start, end, ent);
if (!gl_particles->value)
return;
VectorSubtract (end, start, vec);
len = VectorNormalize (vec);
while (len > 0)
@ -438,7 +459,6 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
}
else if (type == 0)
{ // rocket trail
R_AddFire (start, end, ent);
p->ramp = (rand()&3);
p->color = ramp3[(int)p->ramp];
p->type = pt_fire;
@ -497,7 +517,7 @@ void R_DrawParticles (void)
vec3_t up, right;
float scale;
qboolean alphaTestEnabled;
glBindTexture (GL_TEXTURE_2D, particletexture);
alphaTestEnabled = glIsEnabled(GL_ALPHA_TEST);
@ -748,7 +768,7 @@ R_DrawFire (fire_t *f)
for (i=0 ; i<3 ; i++)
vec[i] = f->origin[i] - vpn[i] * radius;
glVertex3fv (vec);
glColor3f (0.0, 0.0, 0.0);
glColor4f (0.0, 0.0, 0.0, 0.0);
// don't panic, this just draws a bubble...
for (i=16 ; i>=0 ; i--)
@ -804,7 +824,7 @@ R_UpdateFires (void)
}
void
R_FireColor_f(void)
R_FireColor_f (void)
{
int i;

View file

@ -116,6 +116,7 @@ cvar_t *gl_playermip;
cvar_t *gl_nocolors;
cvar_t *gl_keeptjunctions;
cvar_t *gl_reporttjunctions;
cvar_t *gl_particles;
cvar_t *r_skyname;

View file

@ -263,7 +263,10 @@ void R_Init (void)
gl_nocolors = Cvar_Get("gl_nocolors", "0", CVAR_NONE, "None");
gl_fires = Cvar_Get ("gl_fires", "0", CVAR_ARCHIVE,
"Toggles lavaball and rocket fireballs");
"Toggles lavaball and rocket fireballs");
gl_particles = Cvar_Get ("gl_particles", "1", CVAR_ARCHIVE,
"whether or not to draw particles");
gl_keeptjunctions = Cvar_Get("gl_keeptjunctions", "1", CVAR_NONE, "None");
gl_reporttjunctions = Cvar_Get("gl_reporttjunctions", "0", CVAR_NONE, "None");