Rockets and lavaballs now have dlights (same color as their fireballs) attached to them.

This commit is contained in:
Bill Currie 2000-04-25 10:58:47 +00:00
parent 6d9d7b6197
commit 0e44ae7475

View file

@ -865,7 +865,7 @@ void R_DrawParticles (void)
/* /*
R_FireballTrail R_AddFire
Nifty ball of fire GL effect. Kinda a meshing of the dlight and Nifty ball of fire GL effect. Kinda a meshing of the dlight and
particle engine code. particle engine code.
@ -875,14 +875,17 @@ R_AddFire (vec3_t start, vec3_t end, entity_t *ent)
{ {
float len; float len;
fire_t *f; fire_t *f;
dlight_t *dl;
vec3_t vec; vec3_t vec;
int key;
VectorSubtract (end, start, vec); VectorSubtract (end, start, vec);
len = VectorNormalize (vec); len = VectorNormalize (vec);
key = ent-cl_entities+1;
if (len) if (len)
{ {
f = R_AllocFire (ent-cl_entities+1); f = R_AllocFire (key);
VectorCopy (end, f->origin); VectorCopy (end, f->origin);
VectorCopy (start, f->owner); VectorCopy (start, f->owner);
f->size = 20; f->size = 20;
@ -892,6 +895,15 @@ R_AddFire (vec3_t start, vec3_t end, entity_t *ent)
f->color[1] = 0.7; f->color[1] = 0.7;
f->color[2] = 0.3; f->color[2] = 0.3;
f->color[3] = 1.0; f->color[3] = 1.0;
dl = CL_AllocDlight (key);
VectorCopy (end, dl->origin);
dl->radius = 200;
dl->die = cl.time + 0.5;
dl->color[0] = 0.9;
dl->color[1] = 0.7;
dl->color[2] = 0.3;
dl->color[3] = 0.66;
} }
} }
@ -935,7 +947,7 @@ R_AllocFire (int key)
} }
/* /*
R_DrawFireball R_DrawFire
draws one fireball - probably never need to call this directly draws one fireball - probably never need to call this directly
*/ */
@ -987,7 +999,7 @@ R_DrawFire (fire_t *f)
} }
/* /*
R_DrawFireballs R_UpdateFires
Draws each fireball in sequence Draws each fireball in sequence
*/ */