]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added r_editlights_editall command, same as _edit but affects all lights
authortomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 17 Jul 2004 20:17:36 +0000 (20:17 +0000)
committertomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 17 Jul 2004 20:17:36 +0000 (20:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4276 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index a380ad8cdb183c65cbaf0873c6206aebdfc1c6e4..e6996fc17940780ece556f9369a24f70afaca7c8 100644 (file)
@@ -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);