From: havoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Fri, 1 Oct 2004 08:39:08 +0000 (+0000)
Subject: save shorter rtlights lines when cubemap/corona/angles are not used, saves a bit... 
X-Git-Tag: xonotic-v0.1.0preview~5542
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=65ad95c0594befb41bcf02ebe46dd6220d4b01c2;p=xonotic%2Fdarkplaces.git

save shorter rtlights lines when cubemap/corona/angles are not used, saves a bit of space


git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4569 d7cf8633-e32d-0410-b094-e92efae38249
---

diff --git a/r_shadow.c b/r_shadow.c
index ad772e22..1c03ec2c 100644
--- a/r_shadow.c
+++ b/r_shadow.c
@@ -2608,7 +2608,10 @@ void R_Shadow_SaveWorldLights(void)
 	buf = NULL;
 	for (light = r_shadow_worldlightchain;light;light = light->next)
 	{
-		sprintf(line, "%s%f %f %f %f %f %f %f %d %s %f %f %f %f\n", light->shadow ? "" : "!", light->origin[0], light->origin[1], light->origin[2], light->radius / r_editlights_rtlightssizescale.value, light->color[0] / r_editlights_rtlightscolorscale.value, light->color[1] / r_editlights_rtlightscolorscale.value, light->color[2] / r_editlights_rtlightscolorscale.value, light->style, light->cubemapname[0] ? light->cubemapname : "\"\"", light->corona, light->angles[0], light->angles[1], light->angles[2]);
+		if (light->cubemapname[0] || light->corona || light->angles[0] || light->angles[1] || light->angles[2])
+			sprintf(line, "%s%f %f %f %f %f %f %f %d \"%s\" %f %f %f %f\n", light->shadow ? "" : "!", light->origin[0], light->origin[1], light->origin[2], light->radius / r_editlights_rtlightssizescale.value, light->color[0] / r_editlights_rtlightscolorscale.value, light->color[1] / r_editlights_rtlightscolorscale.value, light->color[2] / r_editlights_rtlightscolorscale.value, light->style, light->cubemapname, light->corona, light->angles[0], light->angles[1], light->angles[2]);
+		else
+			sprintf(line, "%s%f %f %f %f %f %f %f %d\n", light->shadow ? "" : "!", light->origin[0], light->origin[1], light->origin[2], light->radius / r_editlights_rtlightssizescale.value, light->color[0] / r_editlights_rtlightscolorscale.value, light->color[1] / r_editlights_rtlightscolorscale.value, light->color[2] / r_editlights_rtlightscolorscale.value, light->style);
 		if (bufchars + (int) strlen(line) > bufmaxchars)
 		{
 			bufmaxchars = bufchars + strlen(line) + 2048;