From: vortex Date: Thu, 22 Oct 2009 22:54:35 +0000 (+0000) Subject: hacky and experimental DP_LIGHTSTYLE_STATICVALUE extension, allows alternative 'stati... X-Git-Tag: xonotic-v0.1.0preview~1253 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cf5b634a519f8d2b9f8df875cb539c3a7f20f703;p=xonotic%2Fdarkplaces.git hacky and experimental DP_LIGHTSTYLE_STATICVALUE extension, allows alternative 'static' lightstyle syntax : "=value", examples: "=0.5", "=2.0", "=2.75". Could be safely used on CSQC side, but SVQC use is limited - other engines connecting to such server will misunderstand this style definition. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9385 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_main.c b/cl_main.c index ef74fd14..5e31b368 100644 --- 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'; diff --git a/svvm_cmds.c b/svvm_cmds.c index 57ef2eef..f25db910 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -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 "