]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - netconn.c
Revert "Initialize console commands and cvars before anything else"
[xonotic/darkplaces.git] / netconn.c
index d6e122da6874ecff8985d9cd09fa3e90d77bcdf9..a2b259b69a417c317013847a4f55691b6cd447a4 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -3866,8 +3866,11 @@ void Net_SlistQW_f(cmd_state_t *cmd)
 }
 #endif
 
-void NetConn_Init_Commands(void)
+void NetConn_Init(void)
 {
+       int i;
+       lhnetaddress_t tempaddress;
+       netconn_mempool = Mem_AllocPool("network connections", 0, NULL);
        Cmd_AddCommand(CMD_SHARED, "net_stats", Net_Stats_f, "print network statistics");
 #ifdef CONFIG_MENU
        Cmd_AddCommand(CMD_CLIENT, "net_slist", Net_Slist_f, "query dp master servers and print all server information");
@@ -3910,19 +3913,11 @@ void NetConn_Init_Commands(void)
        Cvar_RegisterVariable(&sv_public);
        Cvar_RegisterVariable(&sv_public_rejectreason);
        Cvar_RegisterVariable(&sv_heartbeatperiod);
-       for (int i = 0;sv_masters[i].name;i++)
+       for (i = 0;sv_masters[i].name;i++)
                Cvar_RegisterVariable(&sv_masters[i]);
        Cvar_RegisterVariable(&gameversion);
        Cvar_RegisterVariable(&gameversion_min);
        Cvar_RegisterVariable(&gameversion_max);
-}
-
-void NetConn_Init(void)
-{
-       int i;
-       lhnetaddress_t tempaddress;
-       netconn_mempool = Mem_AllocPool("network connections", 0, NULL);
-
 // COMMANDLINEOPTION: Server: -ip <ipaddress> sets the ip address of this machine for purposes of networking (default 0.0.0.0 also known as INADDR_ANY), use only if you have multiple network adapters and need to choose one specifically.
        if ((i = COM_CheckParm("-ip")) && i + 1 < sys.argc)
        {