client: reuse combined colors in CL_ParticleSmokeEffect

This commit is contained in:
Denis Pauk 2024-09-08 18:26:46 +03:00
parent 1d8de9a89a
commit 7e6e776c6a
3 changed files with 5 additions and 4 deletions

View File

@ -2875,7 +2875,7 @@ CL_ColorExplosionParticles(vec3_t org, int color, int run)
* Like the steam effect, but unaffected by gravity
*/
void
CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color,
CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, unsigned int basecolor, unsigned int finalcolor,
int count, int magnitude)
{
int i, j;
@ -2901,7 +2901,7 @@ CL_ParticleSmokeEffect(vec3_t org, vec3_t dir, int color,
active_particles = p;
p->time = time;
p->color = VID_PaletteColor(color + (randk() & 7));
p->color = CombineColors(basecolor, finalcolor, (float)(randk() & 7) / 7.0);
for (j = 0; j < 3; j++)
{

View File

@ -1216,7 +1216,7 @@ CL_ParseTEnt(void)
dir[1] = 0;
dir[2] = 1;
MSG_ReadPos(&net_message, pos);
CL_ParticleSmokeEffect(pos, dir, 0, 20, 20);
CL_ParticleSmokeEffect(pos, dir, 0xff000000, 0xff6b6b6b, 20, 20);
break;
case TE_ELECTRIC_SPARKS:

View File

@ -413,7 +413,8 @@ void CL_ColorFlash (vec3_t pos, int ent, float intensity, float r, float g, floa
void CL_Tracker_Shell(vec3_t origin);
void CL_MonsterPlasma_Shell(vec3_t origin);
void CL_ColorExplosionParticles (vec3_t org, int color, int run);
void CL_ParticleSmokeEffect (vec3_t org, vec3_t dir, int color, int count, int magnitude);
void CL_ParticleSmokeEffect (vec3_t org, vec3_t dir, unsigned int basecolor, unsigned int finalcolor,
int count, int magnitude);
void CL_Widowbeamout (cl_sustain_t *self);
void CL_Nukeblast (cl_sustain_t *self);
void CL_WidowSplash (vec3_t org);