diff --git a/README.md b/README.md index a416c20f..eeac1254 100644 --- a/README.md +++ b/README.md @@ -121,10 +121,10 @@ Goals: * [x] Support flow/scale flags for Q64 maps, * [x] Add debug progress loading code for maps, * [x] MDR model format in Star Trek: Voyager – Elite Force, -* [ ] RGB particles support instead palette based one, -* [ ] Get rid of VID_PaletteColor client internally, +* [x] RGB particles support instead palette based one, +* [ ] Get rid of VID_PaletteColor client internal api use, * [x] Broken maps groups from base2 to next, -* [ ] Single player support, +* [ ] Single player ReRelease support, * [ ] Support effects and additional flags for ReRelease when possible. * [ ] Use shared model cache in client code insted reimplemnet in each render, * [ ] Check load soft colormap as 24bit color, diff --git a/src/client/cl_effects.c b/src/client/cl_effects.c index 6411cc95..936ea14d 100644 --- a/src/client/cl_effects.c +++ b/src/client/cl_effects.c @@ -2395,7 +2395,7 @@ CL_Heatbeam(vec3_t start, vec3_t forward) *Puffs with velocity along direction, with some randomness thrown in */ 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 i, j; @@ -2419,7 +2419,8 @@ CL_ParticleSteamEffect(vec3_t org, vec3_t dir, int color, active_particles = p; 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++) { @@ -2489,7 +2490,7 @@ CL_ParticleSteamEffect2(cl_sustain_t *self) } 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 vec; @@ -2532,7 +2533,7 @@ CL_TrackerTrail(vec3_t start, vec3_t end, int particleColor) p->alpha = 1.0; p->alphavel = -2.0; - p->color = VID_PaletteColor(particleColor); + p->color = color; dist = DotProduct(move, forward); VectorMA(move, 8 * cos(dist), up, p->org); diff --git a/src/client/cl_entities.c b/src/client/cl_entities.c index a9b1c352..a2a48a20 100644 --- a/src/client/cl_entities.c +++ b/src/client/cl_entities.c @@ -561,7 +561,7 @@ CL_AddPacketEntities(frame_t *frame) } 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); } else if (effects & EF_IONRIPPER) diff --git a/src/client/cl_tempentities.c b/src/client/cl_tempentities.c index 871b6b1b..eaffabd1 100644 --- a/src/client/cl_tempentities.c +++ b/src/client/cl_tempentities.c @@ -575,7 +575,8 @@ CL_ParseSteam(void) r = MSG_ReadByte(&net_message); magnitude = MSG_ReadShort(&net_message); 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); r = 8; magnitude = 60; - color = r & 0xff; - CL_ParticleSteamEffect(pos, dir, color, cnt, magnitude); + CL_ParticleSteamEffect(pos, dir, 0xff7b7b7b, 0xffebebeb, cnt, magnitude); S_StartSound(pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0); break; @@ -1196,9 +1196,8 @@ CL_ParseTEnt(void) cnt = 20; MSG_ReadPos(&net_message, pos); MSG_ReadDir(&net_message, dir); - color = 0xe0; 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); break; diff --git a/src/client/header/client.h b/src/client/header/client.h index 90aba2e6..50a7b8ab 100644 --- a/src/client/header/client.h +++ b/src/client/header/client.h @@ -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); void CL_BubbleTrail2 (vec3_t start, vec3_t end, int dist); 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_TrackerTrail (vec3_t start, vec3_t end, int particleColor); +void CL_ParticleSteamEffect (vec3_t org, vec3_t dir, unsigned int basecolor, unsigned int finalcolor, + 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_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);