client: use rgb for CL_FlagTrail/CL_TagTrail

This commit is contained in:
Denis Pauk 2024-09-08 15:54:07 +03:00
parent e188358e2b
commit 74e9708204
3 changed files with 21 additions and 7 deletions

View file

@ -1147,7 +1147,7 @@ CL_QuadTrail(vec3_t start, vec3_t end)
}
void
CL_FlagTrail(vec3_t start, vec3_t end, int color)
CL_FlagTrailRGB(vec3_t start, vec3_t end, int color)
{
vec3_t move;
vec3_t vec;
@ -1185,7 +1185,7 @@ CL_FlagTrail(vec3_t start, vec3_t end, int color)
p->alpha = 1.0;
p->alphavel = -1.0f / (0.8f + frandk() * 0.2f);
p->color = VID_PaletteColor(color);
p->color = color;
for (j = 0; j < 3; j++)
{
@ -1198,6 +1198,12 @@ CL_FlagTrail(vec3_t start, vec3_t end, int color)
}
}
void
CL_FlagTrail(vec3_t start, vec3_t end, int color)
{
CL_FlagTrailRGB(start, end, VID_PaletteColor(color));
}
void
CL_DiminishingTrail(vec3_t start, vec3_t end, centity_t *old, int flags)
{
@ -2753,7 +2759,7 @@ CL_Tracker_Explode(vec3_t origin)
}
void
CL_TagTrail(vec3_t start, vec3_t end, int color)
CL_TagTrailRGB(vec3_t start, vec3_t end, int color)
{
vec3_t move;
vec3_t vec;
@ -2791,7 +2797,7 @@ CL_TagTrail(vec3_t start, vec3_t end, int color)
p->alpha = 1.0;
p->alphavel = -1.0f / (0.8f + frandk() * 0.2f);
p->color = VID_PaletteColor(color);
p->color = color;
for (j = 0; j < 3; j++)
{
@ -2804,6 +2810,12 @@ CL_TagTrail(vec3_t start, vec3_t end, int color)
}
}
void
CL_TagTrail(vec3_t start, vec3_t end, int color)
{
CL_TagTrailRGB(start, end, VID_PaletteColor(color));
}
void
CL_ColorExplosionParticles(vec3_t org, int color, int run)
{

View file

@ -531,17 +531,17 @@ CL_AddPacketEntities(frame_t *frame)
}
else if (effects & EF_FLAG1)
{
CL_FlagTrail(cent->lerp_origin, ent.origin, 242);
CL_FlagTrailRGB(cent->lerp_origin, ent.origin, 0xff0000ff);
V_AddLight(ent.origin, 225, 1, 0.1f, 0.1f);
}
else if (effects & EF_FLAG2)
{
CL_FlagTrail(cent->lerp_origin, ent.origin, 115);
CL_FlagTrailRGB(cent->lerp_origin, ent.origin, 0xff7f672f);
V_AddLight(ent.origin, 225, 0.1f, 0.1f, 1);
}
else if (effects & EF_TAGTRAIL)
{
CL_TagTrail(cent->lerp_origin, ent.origin, 220);
CL_TagTrailRGB(cent->lerp_origin, ent.origin, 0xff27ffff);
V_AddLight(ent.origin, 225, 1.0, 1.0, 0.0);
}
else if (effects & EF_TRACKERTRAIL)

View file

@ -392,6 +392,7 @@ void CL_QuadTrail (vec3_t start, vec3_t end);
void CL_RailTrail (vec3_t start, vec3_t end);
void CL_BubbleTrail (vec3_t start, vec3_t end);
void CL_FlagTrail (vec3_t start, vec3_t end, int color);
void CL_FlagTrailRGB (vec3_t start, vec3_t end, int color);
void CL_IonripperTrail (vec3_t start, vec3_t end);
@ -409,6 +410,7 @@ void CL_ParticleSteamEffect (vec3_t org, vec3_t dir, int color, int count, int m
void CL_TrackerTrail (vec3_t start, vec3_t end, int particleColor);
void CL_Tracker_Explode(vec3_t origin);
void CL_TagTrail (vec3_t start, vec3_t end, int color);
void CL_TagTrailRGB (vec3_t start, vec3_t end, int color);
void CL_ColorFlash (vec3_t pos, int ent, float intensity, float r, float g, float b);
void CL_Tracker_Shell(vec3_t origin);
void CL_MonsterPlasma_Shell(vec3_t origin);