mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
*DOH!*
I goofed up my code. cl_max_particles will not dynamically update with this change, but ATM, this is safer until I can grok what I need to know to fix the code I wrote. Sorry guys, Misty-chan
This commit is contained in:
parent
582a7902c5
commit
820715672b
2 changed files with 16 additions and 14 deletions
|
@ -127,13 +127,8 @@ particle_new_random (ptype_t type, int texnum, vec3_t org, int org_fuzz,
|
|||
void
|
||||
R_InitParticles (void)
|
||||
{
|
||||
if (cl_max_particles->int_val < 1)
|
||||
{
|
||||
/* Protect against stupidity */
|
||||
r_numparticles = 2048;
|
||||
} else {
|
||||
r_numparticles = cl_max_particles->int_val;
|
||||
}
|
||||
// Chooses cvar if bigger than zero, otherwise ignore and set variable to zero
|
||||
r_numparticles = max(cl_max_particles->int_val, 0);
|
||||
|
||||
particles = (particle_t *)
|
||||
Hunk_AllocName (r_numparticles * sizeof (particle_t), "particles");
|
||||
|
@ -141,17 +136,18 @@ R_InitParticles (void)
|
|||
freeparticles = (void *)
|
||||
Hunk_AllocName (r_numparticles * sizeof (particle_t), "particles");
|
||||
|
||||
|
||||
GDT_Init ();
|
||||
}
|
||||
|
||||
/*
|
||||
R_MaxParticlesCheck
|
||||
*/
|
||||
/*
|
||||
This entire section is disabled because I don't understand Hunk_Allocname, or how to fix it yet.
|
||||
void
|
||||
R_MaxParticlesCheck (void)
|
||||
{
|
||||
if (cl_max_particles->int_val == r_numparticles || cl_max_particles->int_val < 1)
|
||||
if (cl_max_particles->int_val == r_numparticles || cl_max_particles->int_val < 0)
|
||||
{
|
||||
return;
|
||||
} else {
|
||||
|
@ -166,7 +162,7 @@ R_MaxParticlesCheck (void)
|
|||
Hunk_AllocName (r_numparticles * sizeof (particle_t), "particles");
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
R_ClearParticles
|
||||
*/
|
||||
|
@ -556,9 +552,10 @@ R_DrawParticles (void)
|
|||
float scale;
|
||||
particle_t *part;
|
||||
int activeparticles, maxparticle, j, k;
|
||||
|
||||
/*
|
||||
Disabled until I fix this
|
||||
R_MaxParticlesCheck ();
|
||||
|
||||
*/
|
||||
// LordHavoc: particles should not affect zbuffer
|
||||
glDepthMask (GL_FALSE);
|
||||
|
||||
|
|
|
@ -74,6 +74,8 @@ R_InitParticles (void)
|
|||
/*
|
||||
R_MaxParticlesCheck
|
||||
*/
|
||||
/*
|
||||
Disabled until it is fixed
|
||||
void
|
||||
R_MaxParticlesCheck (void)
|
||||
{
|
||||
|
@ -88,6 +90,7 @@ R_MaxParticlesCheck (void)
|
|||
Hunk_AllocName (r_numparticles * sizeof (particle_t), "particles");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
R_ClearParticles
|
||||
|
@ -492,8 +495,10 @@ R_DrawParticles (void)
|
|||
float dvel;
|
||||
float frametime;
|
||||
|
||||
/*
|
||||
Disabled until it is fixed.
|
||||
R_MaxParticlesCheck ();
|
||||
|
||||
*/
|
||||
D_StartParticles ();
|
||||
|
||||
VectorScale (vright, xscaleshrink, r_pright);
|
||||
|
|
Loading…
Reference in a new issue