]> git.rm.cloudns.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)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 19 Mar 2011 21:05:13 +0000 (22:05 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10936 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a15cab60804b32029ed8ed7ae23710f90907ba99

r_shadow.c

index 0fac2a55a7106fd1421d11d2f1ce063c993f7abb..805b2ad8387f0179217d59e8ce73d04773d98208 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"