]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
move dynamic lights up 30 units for the client player when firstperson (so the gun...
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 15 Oct 2001 13:41:25 +0000 (13:41 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 15 Oct 2001 13:41:25 +0000 (13:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@920 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index d0f306b7f1e9702fb785e46b7fe67a99476ed9c0..2339a64445f65e594da6a2b7155fd327a7cebd3a 100644 (file)
--- 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)