From 3475a624048189474a4695adadc88f5be8cfc9ba Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Mon, 15 Oct 2001 13:41:25 +0000 Subject: [PATCH] move dynamic lights up 30 units for the client player when firstperson (so the gun gets lit by glow effects) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@920 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cl_main.c b/cl_main.c index d0f306b7..2339a644 100644 --- a/cl_main.c +++ b/cl_main.c @@ -662,9 +662,13 @@ void CL_RelinkEntities (void) if (dlightcolor[0] || dlightcolor[1] || dlightcolor[2]) { + vec3_t vec; dlightradius = VectorLength(dlightcolor); d = 1.0f / dlightradius; - CL_AllocDlight (ent, ent->render.origin, dlightradius, dlightcolor[0] * d, dlightcolor[1] * d, dlightcolor[2] * d, 0, 0); + VectorCopy(ent->render.origin, vec); + if (i == cl.viewentity && !chase_active.value) + vec[2] += 30; + CL_AllocDlight (ent, vec, dlightradius, dlightcolor[0] * d, dlightcolor[1] * d, dlightcolor[2] * d, 0, 0); } if (chase_active.value) -- 2.39.2