]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
fix bug with loading a saved game while a demo is playing (such as the
[xonotic/darkplaces.git] / host_cmd.c
index 706d24d07d8d9a27a2d86e72827b6dd3e32c2505..99f48c30ac8cdb4860fd2353e85c3261b0d6054a 100644 (file)
@@ -561,6 +561,13 @@ void Host_Loadgame_f (void)
 
        Con_Printf("Loading game from %s...\n", filename);
 
 
        Con_Printf("Loading game from %s...\n", filename);
 
+       // stop playing demos
+       if (cls.demoplayback)
+               CL_Disconnect ();
+
+       // remove menu
+       key_dest = key_game;
+
        cls.demonum = -1;               // stop demo loop in case this fails
 
        t = text = (char *)FS_LoadFile (filename, tempmempool, false, NULL);
        cls.demonum = -1;               // stop demo loop in case this fails
 
        t = text = (char *)FS_LoadFile (filename, tempmempool, false, NULL);