]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
added cvar r_fixtrans_auto to automatically call fixtrans on all textures that are...
[xonotic/darkplaces.git] / host_cmd.c
index 578a2b8745d1d3d2e04296d0b6211bc327958445..706d24d07d8d9a27a2d86e72827b6dd3e32c2505 100644 (file)
@@ -30,6 +30,7 @@ cvar_t rcon_address = {0, "rcon_address", "", "server address to send rcon comma
 cvar_t team = {CVAR_USERINFO | CVAR_SAVE, "team", "none", "QW team (4 character limit, example: blue)"};
 cvar_t skin = {CVAR_USERINFO | CVAR_SAVE, "skin", "", "QW player skin name (example: base)"};
 cvar_t noaim = {CVAR_USERINFO | CVAR_SAVE, "noaim", "1", "QW option to disable vertical autoaim"};
+cvar_t r_fixtrans_auto = {0, "r_fixtrans_auto", "0", "automatically fixtrans textures (when set to 2, it also saves the fixed versions to a fixtrans directory)"};
 qboolean allowcheats = false;
 
 extern qboolean host_shuttingdown;
@@ -2498,6 +2499,7 @@ void Host_InitCommands (void)
        Cmd_AddCommand ("pingplreport", Host_PingPLReport_f, "command sent by server containing client ping and packet loss values for scoreboard, triggered by pings command from client (not used by QW servers)");
 
        Cmd_AddCommand ("fixtrans", Image_FixTransparentPixels_f, "change alpha-zero pixels in an image file to sensible values, and write out a new TGA (warning: SLOW)");
+       Cvar_RegisterVariable (&r_fixtrans_auto);
 
        Cvar_RegisterVariable (&team);
        Cvar_RegisterVariable (&skin);