From 9225cd91e2fb907570639f8d8889a6abbb598d99 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 3 Oct 2009 04:07:39 +0000 Subject: [PATCH] minor optimization to CL_RelinkLightFlashes git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9286 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cl_main.c b/cl_main.c index 926c65a9..cd2d7ccb 100644 --- a/cl_main.c +++ b/cl_main.c @@ -740,6 +740,16 @@ void CL_RelinkLightFlashes(void) } } + if (!cl.lightstyle) + { + for (j = 0;j < cl.max_lightstyle;j++) + { + r_refdef.scene.rtlightstylevalue[j] = 1; + r_refdef.scene.lightstylevalue[j] = 256; + } + return; + } + // light animations // 'm' is normal light, 'a' is no light, 'z' is double bright f = cl.time * 10; @@ -747,7 +757,7 @@ void CL_RelinkLightFlashes(void) frac = f - i; for (j = 0;j < cl.max_lightstyle;j++) { - if (!cl.lightstyle || !cl.lightstyle[j].length) + if (!cl.lightstyle[j].length) { r_refdef.scene.rtlightstylevalue[j] = 1; r_refdef.scene.lightstylevalue[j] = 256; -- 2.39.2