Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
cl_lights.c: removed CL_NewDlight() (never used).
Browse files Browse the repository at this point in the history
Cosmetic formatting changes in cl_lights.c and cl_loc.c.
  • Loading branch information
m-x-d committed Jul 16, 2019
1 parent b69732e commit cb3ace3
Show file tree
Hide file tree
Showing 5 changed files with 623 additions and 703 deletions.
30 changes: 15 additions & 15 deletions client/cl_effects.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,25 +701,25 @@ CL_ParticleEffect
Wall impact puffs
===============
*/
void CL_ParticleEffect (vec3_t org, vec3_t dir, int color8, int count)
void CL_ParticleEffect(const vec3_t org, const vec3_t dir, const int color8, const int count)
{
for (int i = 0; i < count; i++)
{
//mxd
cparticle_t *p = CL_InitParticle();
if (!p) return;

color8_to_vec3(color8 + (rand()&7), p->color);
color8_to_vec3(color8 + (rand() & 7), p->color);

const float d = rand()&31;
const float d = rand() & 31;
for (int j = 0; j < 3; j++)
{
p->org[j] = org[j] + ((rand()&7) - 4) + d * dir[j];
p->org[j] = org[j] + ((rand() & 7) - 4) + d * dir[j];
p->vel[j] = crand() * 20;
}

p->accel[2] = -PARTICLE_GRAVITY;
p->alphavel = -1.0 / (0.5 + frand()*0.3);
p->alphavel = -1.0f / (0.5f + frand() * 0.3f);
p->flags = PART_GRAVITY;
}
}
Expand All @@ -731,7 +731,7 @@ CL_ParticleEffect2
*/

#define colorAdd 25
void CL_ParticleEffect2 (vec3_t org, vec3_t dir, int color8, int count)
void CL_ParticleEffect2(const vec3_t org, const vec3_t dir, const int color8, const int count)
{
for (int i = 0; i < count; i++)
{
Expand All @@ -741,18 +741,18 @@ void CL_ParticleEffect2 (vec3_t org, vec3_t dir, int color8, int count)

color8_to_vec3(color8, p->color);

const float d = rand()&7;
const float d = rand() & 7;
for (int j = 0; j < 3; j++)
{
p->org[j] = org[j] + ((rand()&7) - 4) + d * dir[j];
p->org[j] = org[j] + ((rand() & 7) - 4) + d * dir[j];
p->vel[j] = crand() * 20;

if (r_particle_mode->integer != 0)
p->color[j] += colorAdd;
}

p->accel[2] = -PARTICLE_GRAVITY;
p->alphavel = -1.0 / (0.5 + frand()*0.3);
p->alphavel = -1.0f / (0.5f + frand() * 0.3f);
p->flags = PART_GRAVITY;
}
}
Expand All @@ -764,7 +764,7 @@ CL_ParticleEffect3
===============
*/

void CL_ParticleEffect3 (vec3_t org, vec3_t dir, int color8, int count)
void CL_ParticleEffect3(const vec3_t org, const vec3_t dir, const int color8, const int count)
{
for (int i = 0; i < count; i++)
{
Expand All @@ -774,18 +774,18 @@ void CL_ParticleEffect3 (vec3_t org, vec3_t dir, int color8, int count)

color8_to_vec3(color8, p->color);

const float d = rand()&7;
const float d = rand() & 7;
for (int j = 0; j < 3; j++)
{
p->org[j] = org[j] + ((rand()&7) - 4) + d * dir[j];
p->org[j] = org[j] + ((rand() & 7) - 4) + d * dir[j];
p->vel[j] = crand() * 20;

if (r_particle_mode->integer != 0)
p->color[j] += colorAdd;
}

p->accel[2] = PARTICLE_GRAVITY; //mxd. The only difference between this and CL_ParticleEffect2...
p->alphavel = -1.0 / (0.5 + frand()*0.3);
p->alphavel = -1.0f / (0.5f + frand() * 0.3f);
p->flags = PART_GRAVITY;
}
}
Expand Down Expand Up @@ -1198,9 +1198,9 @@ void CL_TeleporterParticles (entity_state_t *ent)
CL_LogoutEffect
===============
*/
void CL_LogoutEffect (vec3_t org, int type)
void CL_LogoutEffect(const vec3_t org, const int type)
{
vec3_t color;
vec3_t color;

switch (type) //mxd
{
Expand Down
Loading

0 comments on commit cb3ace3

Please sign in to comment.