]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.c
Initialize console commands and cvars before anything else
[xonotic/darkplaces.git] / console.c
index 45509faaa1a30341dff6f2be6afb64ca86de7cdf..6b3545e854c99d2065ee39eebc1226a0d88d45e4 100644 (file)
--- a/console.c
+++ b/console.c
@@ -842,23 +842,8 @@ void Con_Clear_f(cmd_state_t *cmd)
        if (con_mutex) Thread_UnlockMutex(con_mutex);
 }
 
-/*
-================
-Con_Init
-================
-*/
-void Con_Init (void)
+void Con_Init_Commands(void)
 {
-       con_linewidth = 80;
-       ConBuffer_Init(&con, CON_TEXTSIZE, CON_MAXLINES, zonemempool);
-       if (Thread_HasThreads())
-               con_mutex = Thread_CreateMutex();
-
-       // Allocate a log queue, this will be freed after configs are parsed
-       logq_size = MAX_INPUTLINE;
-       logqueue = (unsigned char *)Mem_Alloc (tempmempool, logq_size);
-       logq_ind = 0;
-
        Cvar_RegisterVariable (&sys_colortranslation);
        Cvar_RegisterVariable (&sys_specialcharactertranslation);
 
@@ -909,6 +894,25 @@ void Con_Init (void)
        Cmd_AddCommand(CMD_SHARED, "maps", Con_Maps_f, "list information about available maps");
        Cmd_AddCommand(CMD_SHARED, "condump", Con_ConDump_f, "output console history to a file (see also log_file)");
 
+}
+
+/*
+================
+Con_Init
+================
+*/
+void Con_Init (void)
+{
+       con_linewidth = 80;
+       ConBuffer_Init(&con, CON_TEXTSIZE, CON_MAXLINES, zonemempool);
+       if (Thread_HasThreads())
+               con_mutex = Thread_CreateMutex();
+
+       // Allocate a log queue, this will be freed after configs are parsed
+       logq_size = MAX_INPUTLINE;
+       logqueue = (unsigned char *)Mem_Alloc (tempmempool, logq_size);
+       logq_ind = 0;
+
        con_initialized = true;
        Con_DPrint("Console initialized.\n");
 }