mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
this should fix misty-chan's problems :)
This commit is contained in:
parent
d649508b5d
commit
9bb7aee3fe
1 changed files with 5 additions and 11 deletions
|
@ -58,8 +58,6 @@ cvar_t *r_particles;
|
|||
void
|
||||
R_MaxParticlesCheck (cvar_t *var)
|
||||
{
|
||||
// Misty-chan: disabled as it's still not working. Go ahead, try and fix it please :P
|
||||
#if 0
|
||||
// Clear out all the particles. Note this has MASSIVE problems here, it's a lot different than GL that's for sure!
|
||||
R_ClearParticles ();
|
||||
// Do not use 0 in this! sw doesn't grok 0 and it's going to segfault if we do!
|
||||
|
@ -69,15 +67,14 @@ R_MaxParticlesCheck (cvar_t *var)
|
|||
// for checking if this is accidentally being run all the time. Safe to remove if you fixed this section (!)
|
||||
Con_Printf ("%d", r_numparticles);
|
||||
|
||||
free (particles);
|
||||
if (particles)
|
||||
free (particles);
|
||||
|
||||
particles = (particle_t *)
|
||||
calloc (r_numparticles, sizeof (particle_t));
|
||||
particles = (particle_t *) calloc (r_numparticles, sizeof (particle_t));
|
||||
|
||||
// My not so successful attempts to get the sw renderer to work on the fly. ATM this causes segfaults anyway. Be wary!
|
||||
particles[0].next = NULL;
|
||||
free_particles = &particles[0];
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -94,11 +91,6 @@ R_Particles_Init_Cvars (void)
|
|||
cl_max_particles = Cvar_Get ("cl_max_particles", "2048", CVAR_ARCHIVE, R_MaxParticlesCheck,
|
||||
"Maximum amount of particles to display");
|
||||
// This is a temporary hack until R_MaxParticlesCheck is fixed and does NOT belong here. Disable if you're trying to fix above code :)
|
||||
#if 1
|
||||
r_numparticles = max(cl_max_particles->int_val, 1);
|
||||
particles = (particle_t *)
|
||||
calloc (r_numparticles, sizeof (particle_t));
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -109,6 +101,8 @@ R_ClearParticles (void)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (!particles)
|
||||
return;
|
||||
free_particles = &particles[0];
|
||||
active_particles = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue