|
|
@ -49,7 +49,7 @@ void CL_DrawParticles( double frametime, particle_t *cl_active_particles, float |
|
|
|
{ |
|
|
|
{ |
|
|
|
particle_t *p; |
|
|
|
particle_t *p; |
|
|
|
vec3_t right, up; |
|
|
|
vec3_t right, up; |
|
|
|
color24 сolor; |
|
|
|
color24 color; |
|
|
|
int alpha; |
|
|
|
int alpha; |
|
|
|
float size; |
|
|
|
float size; |
|
|
|
|
|
|
|
|
|
|
@ -85,15 +85,15 @@ void CL_DrawParticles( double frametime, particle_t *cl_active_particles, float |
|
|
|
VectorScale( RI.cull_vup, size, up ); |
|
|
|
VectorScale( RI.cull_vup, size, up ); |
|
|
|
|
|
|
|
|
|
|
|
p->color = bound( 0, p->color, 255 ); |
|
|
|
p->color = bound( 0, p->color, 255 ); |
|
|
|
сolor = tr.palette[p->color]; |
|
|
|
color = tr.palette[p->color]; |
|
|
|
|
|
|
|
|
|
|
|
alpha = 255 * (p->die - gpGlobals->time) * 16.0f; |
|
|
|
alpha = 255 * (p->die - gpGlobals->time) * 16.0f; |
|
|
|
if( alpha > 255 || p->type == pt_static ) |
|
|
|
if( alpha > 255 || p->type == pt_static ) |
|
|
|
alpha = 255; |
|
|
|
alpha = 255; |
|
|
|
|
|
|
|
|
|
|
|
pglColor4ub( gEngfuncs.LightToTexGamma( сolor.r ), |
|
|
|
pglColor4ub( gEngfuncs.LightToTexGamma( color.r ), |
|
|
|
gEngfuncs.LightToTexGamma( сolor.g ), |
|
|
|
gEngfuncs.LightToTexGamma( color.g ), |
|
|
|
gEngfuncs.LightToTexGamma( сolor.b ), alpha ); |
|
|
|
gEngfuncs.LightToTexGamma( color.b ), alpha ); |
|
|
|
|
|
|
|
|
|
|
|
pglTexCoord2f( 0.0f, 1.0f ); |
|
|
|
pglTexCoord2f( 0.0f, 1.0f ); |
|
|
|
pglVertex3f( p->org[0] - right[0] + up[0], p->org[1] - right[1] + up[1], p->org[2] - right[2] + up[2] ); |
|
|
|
pglVertex3f( p->org[0] - right[0] + up[0], p->org[1] - right[1] + up[1], p->org[2] - right[2] + up[2] ); |
|
|
|