Added cl_rocketlight, cl_muzzleflash cvars.

This commit is contained in:
Anton E. Gavrilov 2000-05-05 14:47:03 +00:00
parent 948999098b
commit 1656f76b88
4 changed files with 28 additions and 8 deletions

View file

@ -565,11 +565,14 @@ void CL_LinkPacketEntities (void)
if (model->flags & EF_ROCKET)
{
R_RocketTrail (old_origin, ent->origin, 0, ent);
if (cl_rocketlight->value)
{
dl = CL_AllocDlight (s1->number);
VectorCopy (ent->origin, dl->origin);
dl->radius = 200;
dl->die = cl.time + 0.1;
}
}
else if (model->flags & EF_GRENADE)
R_RocketTrail (old_origin, ent->origin, 1, ent);
else if (model->flags & EF_GIB)

View file

@ -133,6 +133,8 @@ cvar_t *cl_solid_players;
cvar_t *cl_verstring;
cvar_t *cl_talksound;
cvar_t *cl_muzzleflash;
cvar_t *cl_rocketlight;
extern cvar_t *sys_nostdout;
@ -1297,6 +1299,9 @@ void CL_RelinkEntities (void)
{
vec3_t fv, rv, uv;
if (!cl_muzzleflash->value || (cl_muzzleflash->value == 2 && ent == &cl_entities[cl.playernum+1]))
return;
dl = CL_AllocDlight (i);
VectorCopy (ent->origin, dl->origin);
dl->origin[2] += 16;
@ -1351,11 +1356,14 @@ void CL_RelinkEntities (void)
else if (ent->model->flags & EF_ROCKET)
{
R_RocketTrail (oldorg, ent->origin, 0, ent);
if (cl_rocketlight->value)
{
dl = CL_AllocDlight (i);
VectorCopy (ent->origin, dl->origin);
dl->radius = 200;
dl->die = cl.time + 0.01;
}
}
else if (ent->model->flags & EF_GRENADE)
R_RocketTrail (oldorg, ent->origin, 1, ent);
else if (ent->model->flags & EF_TRACER3)
@ -1852,6 +1860,10 @@ void CL_InitCvars()
cl_talksound = Cvar_Get ("cl_talksound", "misc/talk.wav", CVAR_NONE,
"Sets the sound used for talk messages");
cl_muzzleflash = Cvar_Get ("cl_muzzleflash", "1", CVAR_NONE,
"Muzzleflashes: 0 - off, 1 - none, 2 - own off");
cl_rocketlight = Cvar_Get ("cl_rocketlight", "1", CVAR_NONE,
"Toggles dynamic rocket lighting effect");
localid = Cvar_Get ("localid","",0,"None");

View file

@ -385,6 +385,8 @@ extern cvar_t *cl_pitchdriftspeed;
extern cvar_t *cl_verstring;
extern cvar_t *cl_talksound;
extern cvar_t *cl_muzzleflash;
extern cvar_t *cl_rocketlight;
extern cvar_t *lookspring;
extern cvar_t *lookstrafe;

View file

@ -1039,6 +1039,9 @@ void CL_MuzzleFlash (void)
if (i-1 == cl.playernum && gl_flashblend->value)
return;
if (!cl_muzzleflash->value || (cl_muzzleflash->value == 2 && i-1 == cl.playernum))
return;
pl = &cl.frames[parsecountmod].playerstate[i-1];
dl = CL_AllocDlight (i);