From: havoc Date: Tue, 9 Mar 2004 04:56:04 +0000 (+0000) Subject: fix saving of rtlights files (everything past cubemap was getting lost) X-Git-Tag: xonotic-v0.1.0preview~6026 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=08d8aa4314bea800e53d140ad7c923abc4a4a148 fix saving of rtlights files (everything past cubemap was getting lost) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3981 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index 5b5d53fd..58f203e6 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -2461,6 +2461,22 @@ void R_Shadow_LoadWorldLights(void) n = 0; while (*s) { + t = s; + /* + shadow = true; + for (;COM_Parse(t, true) && strcmp( + if (COM_Parse(t, true)) + { + if (com_token[0] == '!') + { + shadow = false; + origin[0] = atof(com_token+1); + } + else + origin[0] = atof(com_token); + if (Com_Parse(t + } + */ t = s; while (*s && *s != '\n') s++; @@ -2519,7 +2535,7 @@ 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 ? light->cubemapname : "\"\"", 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[0] ? light->cubemapname : "\"\"", light->corona, light->angles[0], light->angles[1], light->angles[2]); if (bufchars + (int) strlen(line) > bufmaxchars) { bufmaxchars = bufchars + strlen(line) + 2048;