From 4de092775af6125e048af7f6260b480c08ea4e6e Mon Sep 17 00:00:00 2001 From: tomaz Date: Sat, 17 Jul 2004 20:17:36 +0000 Subject: [PATCH] added r_editlights_editall command, same as _edit but affects all lights git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4276 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 a380ad8c..e6996fc1 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -3215,6 +3215,17 @@ void R_Shadow_EditLights_Edit_f(void) R_Shadow_NewWorldLight(origin, angles, color, radius, corona, style, shadows, cubemapname); } +void R_Shadow_EditLights_EditAll_f(void) +{ + dlight_t *light; + + for (light = r_shadow_worldlightchain;light;light = light->next) + { + R_Shadow_SelectLight(light); + R_Shadow_EditLights_Edit_f(); + } +} + void R_Shadow_EditLights_DrawSelectedLightProperties(void) { float x, y; @@ -3347,6 +3358,7 @@ void R_Shadow_EditLights_Init(void) Cmd_AddCommand("r_editlights_save", R_Shadow_EditLights_Save_f); Cmd_AddCommand("r_editlights_spawn", R_Shadow_EditLights_Spawn_f); Cmd_AddCommand("r_editlights_edit", R_Shadow_EditLights_Edit_f); + Cmd_AddCommand("r_editlights_editall", R_Shadow_EditLights_EditAll_f); Cmd_AddCommand("r_editlights_remove", R_Shadow_EditLights_Remove_f); Cmd_AddCommand("r_editlights_toggleshadow", R_Shadow_EditLights_ToggleShadow_f); Cmd_AddCommand("r_editlights_togglecorona", R_Shadow_EditLights_ToggleCorona_f); -- 2.39.2