]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Add "originscale" parameter to r_editlights (may be useful if map was scaled)
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 19 Mar 2011 20:24:43 +0000 (20:24 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 19 Mar 2011 20:24:43 +0000 (20:24 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10936 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 5f3a2dfe863f74ddb680a725539c086db0796861..52a2357d53662ef3cdf3e0b714a3e0c8a422cc20 100644 (file)
@@ -6042,6 +6042,17 @@ void R_Shadow_EditLights_Edit_f(void)
                origin[1] = atof(Cmd_Argv(3));
                origin[2] = atof(Cmd_Argv(4));
        }
+       else if (!strcmp(Cmd_Argv(1), "originscale"))
+       {
+               if (Cmd_Argc() != 5)
+               {
+                       Con_Printf("usage: r_editlights_edit %s x y z\n", Cmd_Argv(1));
+                       return;
+               }
+               origin[0] *= atof(Cmd_Argv(2));
+               origin[1] *= atof(Cmd_Argv(3));
+               origin[2] *= atof(Cmd_Argv(4));
+       }
        else if (!strcmp(Cmd_Argv(1), "originx"))
        {
                if (Cmd_Argc() != 3)
@@ -6473,6 +6484,7 @@ void R_Shadow_EditLights_Help_f(void)
 "colorscale r g b : multiply color of light (1 1 1 does nothing)\n"
 "radiusscale scale : multiply radius (size) of light (1 does nothing)\n"
 "sizescale scale : multiply radius (size) of light (1 does nothing)\n"
+"originscale x y z : multiply origin of light (1 1 1 does nothing)\n"
 "style style : set lightstyle of light (flickering patterns, switches, etc)\n"
 "cubemap basename : set filter cubemap of light (not yet supported)\n"
 "shadows 1/0 : turn on/off shadows\n"