mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 17:31:08 +00:00
Very minor changes. cl_max_particles still cannot be used dynamically,
however I've removed the stupid limits that I'd accidentally left behind in my panic to comment out the messed up code in r_part.c so software clients now can use a setting of zero. Particles in sw clients will not default to 2048 if you use a number less than 1 - it will now use 0. Otherwise, I made comments to myself for when I actually fix this and cleared up some silliness in comments I'd made. Nothing special. Special note: To use cl_max_particles *right now* you can either set it while playing and then restart the client (I think this should work, it's archived. May not however) Or do this which I absolutely am *positive* works: clientname othercommands +set cl_max_particles number othercommands So, again, while changing in game does not work, it at least is still useful somewhat. Misty-chan
This commit is contained in:
parent
820715672b
commit
b25a437460
2 changed files with 10 additions and 12 deletions
|
@ -127,12 +127,13 @@ particle_new_random (ptype_t type, int texnum, vec3_t org, int org_fuzz,
|
|||
void
|
||||
R_InitParticles (void)
|
||||
{
|
||||
// Chooses cvar if bigger than zero, otherwise ignore and set variable to zero
|
||||
// Misty-chan: Chooses cvar if bigger than zero, otherwise ignore and set variable to zero. Deek showed this to me.
|
||||
r_numparticles = max(cl_max_particles->int_val, 0);
|
||||
|
||||
particles = (particle_t *)
|
||||
Hunk_AllocName (r_numparticles * sizeof (particle_t), "particles");
|
||||
|
||||
// Misty-chan: Note to self, *THIS* is bugged, use our line when we remerge
|
||||
freeparticles = (void *)
|
||||
Hunk_AllocName (r_numparticles * sizeof (particle_t), "particles");
|
||||
|
||||
|
@ -143,7 +144,7 @@ R_InitParticles (void)
|
|||
R_MaxParticlesCheck
|
||||
*/
|
||||
/*
|
||||
This entire section is disabled because I don't understand Hunk_Allocname, or how to fix it yet.
|
||||
Misty-chan: This entire section is disabled until it can be fixed
|
||||
void
|
||||
R_MaxParticlesCheck (void)
|
||||
{
|
||||
|
@ -154,7 +155,9 @@ R_MaxParticlesCheck (void)
|
|||
R_ClearParticles();
|
||||
r_numparticles = cl_max_particles->int_val;
|
||||
|
||||
|
||||
// Misty-chan: Note to self: PLEASE remember to do this section in this order:
|
||||
// R_ClearParticles to disable the particles, then free the memory, then calloc.
|
||||
// then set the variable. Otherwise you'll likely be shot on sight.
|
||||
particles = (particle_t *)
|
||||
Hunk_AllocName (r_numparticles * sizeof (particle_t), "particles");
|
||||
|
||||
|
|
|
@ -59,14 +59,9 @@ cvar_t *r_particles;
|
|||
void
|
||||
R_InitParticles (void)
|
||||
{
|
||||
if (cl_max_particles->int_val < 1)
|
||||
{
|
||||
/* Abuse check */
|
||||
r_numparticles = 2048;
|
||||
} else {
|
||||
r_numparticles = cl_max_particles->int_val;
|
||||
}
|
||||
|
||||
// Misty-chan: Chooses cvar if bigger than zero, otherwise ignore and set variable to zero. Deek showed this to me.
|
||||
r_numparticles = max(cl_max_particles->int_val, 0);
|
||||
|
||||
particles = (particle_t *)
|
||||
Hunk_AllocName (r_numparticles * sizeof (particle_t), "particles");
|
||||
}
|
||||
|
@ -75,7 +70,7 @@ R_InitParticles (void)
|
|||
R_MaxParticlesCheck
|
||||
*/
|
||||
/*
|
||||
Disabled until it is fixed
|
||||
Misty-chan: Disabled until it is fixed
|
||||
void
|
||||
R_MaxParticlesCheck (void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue