From a15cab60804b32029ed8ed7ae23710f90907ba99 Mon Sep 17 00:00:00 2001 From: vortex Date: Sat, 19 Mar 2011 20:24:43 +0000 Subject: [PATCH] Add "originscale" parameter to r_editlights (may be useful if map was scaled) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10936 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/r_shadow.c b/r_shadow.c index 5f3a2dfe..52a2357d 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -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" -- 2.39.2