Make r_torch work regardless of whether the player model is visible or not.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6093 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
bc5d8c6815
commit
9051c590e2
1 changed files with 16 additions and 14 deletions
|
@ -4096,6 +4096,22 @@ void CL_LinkPacketEntities (void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (r_torch.ival && state->number <= cl.allocated_client_slots)
|
||||||
|
{
|
||||||
|
dlight_t *dl;
|
||||||
|
dl = CL_NewDlight(state->number, ent->origin, 300, r_torch.ival, 0.9, 0.9, 0.6);
|
||||||
|
dl->flags |= LFLAG_SHADOWMAP|LFLAG_FLASHBLEND;
|
||||||
|
dl->fov = 90;
|
||||||
|
VectorCopy(le->angles, angles);
|
||||||
|
angles[0] *= 3;
|
||||||
|
// angles[1] += sin(realtime)*8;
|
||||||
|
// angles[0] += cos(realtime*1.13)*5;
|
||||||
|
AngleVectorsMesh(angles, dl->axis[0], dl->axis[1], dl->axis[2]);
|
||||||
|
VectorInverse(dl->axis[1]);
|
||||||
|
|
||||||
|
VectorMA(dl->origin, 16, dl->axis[0], dl->origin);
|
||||||
|
}
|
||||||
|
|
||||||
// if set to invisible, skip
|
// if set to invisible, skip
|
||||||
if (state->modelindex<1 || (state->effects & NQEF_NODRAW))
|
if (state->modelindex<1 || (state->effects & NQEF_NODRAW))
|
||||||
{
|
{
|
||||||
|
@ -4391,20 +4407,6 @@ void CL_LinkPacketEntities (void)
|
||||||
CLQ1_AddShadow(ent);
|
CLQ1_AddShadow(ent);
|
||||||
CLQ1_AddPowerupShell(ent, false, state->effects);
|
CLQ1_AddPowerupShell(ent, false, state->effects);
|
||||||
|
|
||||||
if (r_torch.ival && ent->keynum <= cl.allocated_client_slots)
|
|
||||||
{
|
|
||||||
dlight_t *dl;
|
|
||||||
dl = CL_NewDlight(ent->keynum, ent->origin, 300, r_torch.ival, 0.9, 0.9, 0.6);
|
|
||||||
dl->flags |= LFLAG_SHADOWMAP|LFLAG_FLASHBLEND;
|
|
||||||
dl->fov = 90;
|
|
||||||
angles[0] *= 3;
|
|
||||||
// angles[1] += sin(realtime)*8;
|
|
||||||
// angles[0] += cos(realtime*1.13)*5;
|
|
||||||
AngleVectors(angles, dl->axis[0], dl->axis[1], dl->axis[2]);
|
|
||||||
|
|
||||||
VectorMA(dl->origin, 16, dl->axis[0], dl->origin);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (model2)
|
if (model2)
|
||||||
CL_AddVWeapModel (ent, model2);
|
CL_AddVWeapModel (ent, model2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue