]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Partially revert r12699 pending better solution
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 21 Jun 2020 20:39:05 +0000 (20:39 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 21 Jun 2020 20:39:05 +0000 (20:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12713 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
cmd.c
host.c

index b03292c934bdc417c7b6d827f7b832edc4bdc9e2..e17cc44f17b9f289364e49e4cc7c622b5c759714 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -2776,7 +2776,6 @@ void CL_Init (void)
                CL_MeshEntities_Init();
 
                CL_Video_Init();
-               Host_StartVideo();
 
                #ifdef CONFIG_MENU
                Cbuf_InsertText(&cmd_client,"menu_start\n");
diff --git a/cmd.c b/cmd.c
index f7d84dc2c21f55023b5d270c54b460dc59c09714..095d63b522422d11870f792689129dead26ebf2b 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -410,6 +410,10 @@ static void Cmd_StuffCmds_f (cmd_state_t *cmd)
        int             i, j, l;
        // this is for all commandline options combined (and is bounds checked)
        char    build[MAX_INPUTLINE];
+       
+       // come back later so we don't crash
+       if(host.state == host_init)
+               return;
 
        if (Cmd_Argc (cmd) != 1)
        {
diff --git a/host.c b/host.c
index 1b935c7e8eb333bec47203447881ff77765694de..85096e3993814a46395a007d4eb8556123f89675 100644 (file)
--- a/host.c
+++ b/host.c
@@ -1286,6 +1286,8 @@ static void Host_Init (void)
 
        Host_AddConfigText(cmd);
 
+       Host_StartVideo();
+
        // if quake.rc is missing, use default
        if (!FS_FileExists("quake.rc"))
        {
@@ -1295,6 +1297,10 @@ static void Host_Init (void)
 
        host.state = host_active;
 
+       // run stuffcmds now, deferred previously because it can crash if a server starts that early
+       Cbuf_AddText(cmd,"stuffcmds\n");
+       Cbuf_Execute(cmd);
+
        Log_Start();
 
        // put up the loading image so the user doesn't stare at a black screen...