From: lordhavoc Date: Mon, 15 Oct 2001 13:41:25 +0000 (+0000) Subject: move dynamic lights up 30 units for the client player when firstperson (so the gun... X-Git-Tag: RELEASE_0_2_0_RC1~788 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3475a624048189474a4695adadc88f5be8cfc9ba;p=xonotic%2Fdarkplaces.git 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 --- 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)