]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Logging: remove remaining uses of print and printf
authorTimePath <andrew.hardaker1995@gmail.com>
Tue, 27 Oct 2015 09:28:47 +0000 (20:28 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Tue, 27 Oct 2015 09:28:47 +0000 (20:28 +1100)
qcsrc/client/quickmenu.qc
qcsrc/server/mutators/mutator/gamemode_deathmatch.qc

index 1f7be0c500ca33663a11463d1e96233982b048ed..1d229279ace0fb22aee70e4750e408c52975303e 100644 (file)
@@ -75,12 +75,12 @@ bool QuickMenu_Open(string mode, string submenu)
        if(mode == "file")
        {
                if(autocvar_hud_panel_quickmenu_file == "" || autocvar_hud_panel_quickmenu_file == "0")
-                       printf("No file name is set in hud_panel_quickmenu_file, loading default quickmenu\n");
+                       LOG_INFO("No file name is set in hud_panel_quickmenu_file, loading default quickmenu\n");
                else
                {
                        fh = fopen(autocvar_hud_panel_quickmenu_file, FILE_READ);
                        if(fh < 0)
-                               printf("Couldn't open file \"%s\", loading default quickmenu\n", autocvar_hud_panel_quickmenu_file);
+                               LOG_INFO("Couldn't open file \"%s\", loading default quickmenu\n", autocvar_hud_panel_quickmenu_file);
                }
                if(fh < 0)
                        mode = "default";
@@ -152,7 +152,7 @@ bool QuickMenu_Open(string mode, string submenu)
        }
        else
        {
-               printf("Unrecognized mode %s\n", mode);
+               LOG_WARNING("Unrecognized mode %s\n", mode);
                return false;
        }
 
@@ -286,7 +286,7 @@ bool QuickMenu_Page_Load(string target_submenu, int new_page)
                        // printf("^1 skipping %s\n", s);
                }
                if(QuickMenu_Buffer_Index == QuickMenu_Buffer_Size)
-                       printf("Couldn't find submenu \"%s\"\n", z_submenu);
+                       LOG_WARNING("Couldn't find submenu \"%s\"\n", z_submenu);
        }
 
        // only the last page can contain up to QUICKMENU_MAXLINES entries
@@ -859,9 +859,9 @@ void QuickMenu_Default(string target_submenu)
 
        if(target_submenu != "" && !target_submenu_found)
        {
-               printf("Couldn't find submenu \"%s\"\n", target_submenu);
+               LOG_WARNING("Couldn't find submenu \"%s\"\n", target_submenu);
                if(prvm_language != "en")
-                       printf("^3Warning: submenu must be in English\n", target_submenu);
+                       LOG_WARNING("^3Warning: submenu must be in English\n", target_submenu);
                QuickMenu_Buffer_Size = 0;
        }
 }
index 5ebd7c6b6e65b477ac711cb21fb1c54dc93adca5..d05bc18bd2125fc0de1eadc9c52c3fbd133af0f2 100644 (file)
@@ -18,7 +18,7 @@ REGISTER_MUTATOR(dm, false)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               error("This is a game type and it cannot be removed at runtime.");
                return -1;
        }