mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
client: reuse combined colors in CL_ParticleSteamEffect
This commit is contained in:
parent
ee4086c82d
commit
8ab3e54f6a
5 changed files with 16 additions and 15 deletions
|
@ -121,10 +121,10 @@ Goals:
|
||||||
* [x] Support flow/scale flags for Q64 maps,
|
* [x] Support flow/scale flags for Q64 maps,
|
||||||
* [x] Add debug progress loading code for maps,
|
* [x] Add debug progress loading code for maps,
|
||||||
* [x] MDR model format in Star Trek: Voyager – Elite Force,
|
* [x] MDR model format in Star Trek: Voyager – Elite Force,
|
||||||
* [ ] RGB particles support instead palette based one,
|
* [x] RGB particles support instead palette based one,
|
||||||
* [ ] Get rid of VID_PaletteColor client internally,
|
* [ ] Get rid of VID_PaletteColor client internal api use,
|
||||||
* [x] Broken maps groups from base2 to next,
|
* [x] Broken maps groups from base2 to next,
|
||||||
* [ ] Single player support,
|
* [ ] Single player ReRelease support,
|
||||||
* [ ] Support effects and additional flags for ReRelease when possible.
|
* [ ] Support effects and additional flags for ReRelease when possible.
|
||||||
* [ ] Use shared model cache in client code insted reimplemnet in each render,
|
* [ ] Use shared model cache in client code insted reimplemnet in each render,
|
||||||
* [ ] Check load soft colormap as 24bit color,
|
* [ ] Check load soft colormap as 24bit color,
|
||||||
|
|
|
@ -2395,7 +2395,7 @@ CL_Heatbeam(vec3_t start, vec3_t forward)
|
||||||
*Puffs with velocity along direction, with some randomness thrown in
|
*Puffs with velocity along direction, with some randomness thrown in
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color,
|
CL_ParticleSteamEffect(vec3_t org, vec3_t dir, unsigned int basecolor, unsigned int finalcolor,
|
||||||
int count, int magnitude)
|
int count, int magnitude)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -2419,7 +2419,8 @@ CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color,
|
||||||
active_particles = p;
|
active_particles = p;
|
||||||
|
|
||||||
p->time = time;
|
p->time = time;
|
||||||
p->color = VID_PaletteColor(color + (randk() & 7));
|
p->color = CL_CombineColors(basecolor, finalcolor,
|
||||||
|
(float)(randk() & 7) / 7.0);
|
||||||
|
|
||||||
for (j = 0; j < 3; j++)
|
for (j = 0; j < 3; j++)
|
||||||
{
|
{
|
||||||
|
@ -2489,7 +2490,7 @@ CL_ParticleSteamEffect2(cl_sustain_t *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor)
|
CL_TrackerTrail(vec3_t start, vec3_t end, unsigned int color)
|
||||||
{
|
{
|
||||||
vec3_t move;
|
vec3_t move;
|
||||||
vec3_t vec;
|
vec3_t vec;
|
||||||
|
@ -2532,7 +2533,7 @@ CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor)
|
||||||
|
|
||||||
p->alpha = 1.0;
|
p->alpha = 1.0;
|
||||||
p->alphavel = -2.0;
|
p->alphavel = -2.0;
|
||||||
p->color = VID_PaletteColor(particleColor);
|
p->color = color;
|
||||||
dist = DotProduct(move, forward);
|
dist = DotProduct(move, forward);
|
||||||
VectorMA(move, 8 * cos(dist), up, p->org);
|
VectorMA(move, 8 * cos(dist), up, p->org);
|
||||||
|
|
||||||
|
|
|
@ -561,7 +561,7 @@ CL_AddPacketEntities(frame_t *frame)
|
||||||
}
|
}
|
||||||
else if (effects & EF_TRACKER)
|
else if (effects & EF_TRACKER)
|
||||||
{
|
{
|
||||||
CL_TrackerTrail(cent->lerp_origin, ent.origin, 0);
|
CL_TrackerTrail(cent->lerp_origin, ent.origin, 0xff000000);
|
||||||
V_AddLight(ent.origin, 200, -1, -1, -1);
|
V_AddLight(ent.origin, 200, -1, -1, -1);
|
||||||
}
|
}
|
||||||
else if (effects & EF_IONRIPPER)
|
else if (effects & EF_IONRIPPER)
|
||||||
|
|
|
@ -575,7 +575,8 @@ CL_ParseSteam(void)
|
||||||
r = MSG_ReadByte(&net_message);
|
r = MSG_ReadByte(&net_message);
|
||||||
magnitude = MSG_ReadShort(&net_message);
|
magnitude = MSG_ReadShort(&net_message);
|
||||||
color = r & 0xff;
|
color = r & 0xff;
|
||||||
CL_ParticleSteamEffect(pos, dir, color, cnt, magnitude);
|
CL_ParticleSteamEffect(pos, dir,
|
||||||
|
VID_PaletteColor(color), VID_PaletteColor(color + 7), cnt, magnitude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1187,8 +1188,7 @@ CL_ParseTEnt(void)
|
||||||
MSG_ReadDir(&net_message, dir);
|
MSG_ReadDir(&net_message, dir);
|
||||||
r = 8;
|
r = 8;
|
||||||
magnitude = 60;
|
magnitude = 60;
|
||||||
color = r & 0xff;
|
CL_ParticleSteamEffect(pos, dir, 0xff7b7b7b, 0xffebebeb, cnt, magnitude);
|
||||||
CL_ParticleSteamEffect(pos, dir, color, cnt, magnitude);
|
|
||||||
S_StartSound(pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
|
S_StartSound(pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1196,9 +1196,8 @@ CL_ParseTEnt(void)
|
||||||
cnt = 20;
|
cnt = 20;
|
||||||
MSG_ReadPos(&net_message, pos);
|
MSG_ReadPos(&net_message, pos);
|
||||||
MSG_ReadDir(&net_message, dir);
|
MSG_ReadDir(&net_message, dir);
|
||||||
color = 0xe0;
|
|
||||||
magnitude = 60;
|
magnitude = 60;
|
||||||
CL_ParticleSteamEffect(pos, dir, color, cnt, magnitude);
|
CL_ParticleSteamEffect(pos, dir, 0xff07abff, 0xff002bab, cnt, magnitude);
|
||||||
S_StartSound(pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
|
S_StartSound(pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -408,8 +408,9 @@ void CL_GenericParticleEffect (vec3_t org, vec3_t dir, unsigned int basecolor, u
|
||||||
int count, int numcolors, int dirspread, float alphavel);
|
int count, int numcolors, int dirspread, float alphavel);
|
||||||
void CL_BubbleTrail2 (vec3_t start, vec3_t end, int dist);
|
void CL_BubbleTrail2 (vec3_t start, vec3_t end, int dist);
|
||||||
void CL_Heatbeam (vec3_t start, vec3_t end);
|
void CL_Heatbeam (vec3_t start, vec3_t end);
|
||||||
void CL_ParticleSteamEffect (vec3_t org, vec3_t dir, int color, int count, int magnitude);
|
void CL_ParticleSteamEffect (vec3_t org, vec3_t dir, unsigned int basecolor, unsigned int finalcolor,
|
||||||
void CL_TrackerTrail (vec3_t start, vec3_t end, int particleColor);
|
int count, int magnitude);
|
||||||
|
void CL_TrackerTrail (vec3_t start, vec3_t end, unsigned int particleColor);
|
||||||
void CL_Tracker_Explode(vec3_t origin);
|
void CL_Tracker_Explode(vec3_t origin);
|
||||||
void CL_TagTrail (vec3_t start, vec3_t end, int color);
|
void CL_TagTrail (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_ColorFlash (vec3_t pos, int ent, float intensity, float r, float g, float b);
|
||||||
|
|
Loading…
Reference in a new issue