]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
hacky and experimental DP_LIGHTSTYLE_STATICVALUE extension, allows alternative 'stati...
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 22 Oct 2009 22:54:35 +0000 (22:54 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 22 Oct 2009 22:54:35 +0000 (22:54 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9385 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
svvm_cmds.c

index ef74fd14384a76ef2c834d7f9e0495e0b7acac30..5e31b36841e3cafa74a5ddbe818f685764ea4271 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -764,6 +764,14 @@ void CL_RelinkLightFlashes(void)
                        r_refdef.scene.lightstylevalue[j] = 256;
                        continue;
                }
+               // static lightstyle "=value"
+               if (cl.lightstyle[j].map[0] == '=')
+               {
+                       r_refdef.scene.rtlightstylevalue[j] = atof(cl.lightstyle[j].map + 1);
+                       if ( r_lerplightstyles.integer || ((int)f - f) < 0.01)
+                               r_refdef.scene.lightstylevalue[j] = r_refdef.scene.rtlightstylevalue[j];
+                       continue;
+               }
                k = i % cl.lightstyle[j].length;
                l = (i-1) % cl.lightstyle[j].length;
                k = cl.lightstyle[j].map[k] - 'a';
index 57ef2eef6887f420d0b96f3757cb5db719616e6a..f25db9108d964834c145fbacd17c359cfe24e3dd 100644 (file)
@@ -167,6 +167,7 @@ char *vm_sv_extensions =
 "DP_TE_STANDARDEFFECTBUILTINS "
 "DP_TRACE_HITCONTENTSMASK_SURFACEINFO "
 "DP_VIEWZOOM "
+"DP_LIGHTSTYLE_STATICVALUE "
 "EXT_BITSHIFT "
 "FRIK_FILE "
 "FTE_QC_CHECKPVS "