]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
open client sockets before video starts, so that the Windows Firewall
[xonotic/darkplaces.git] / cl_parse.c
index d6423d1bb28d64668aed0794d1374ec5faa203f0..d6b70ac250c72a93e6210bc714890b903c05bcc0 100644 (file)
@@ -434,7 +434,7 @@ static qboolean QW_CL_CheckOrDownloadFile(const char *filename)
        qfile_t *file;
 
        // see if the file already exists
-       file = FS_Open(filename, "rb", true, false);
+       file = FS_OpenVirtualFile(filename, true);
        if (file)
        {
                FS_Close(file);
@@ -1046,7 +1046,7 @@ void CL_BeginDownloads(qboolean aborteddownload)
        }
 
        if(gamemode == GAME_NEXUIZ)
-               goto skipdownloads;
+               Cvar_SetValueQuick(&cl_serverextension_download, false);
                // in Nexuiz, the built in download protocol is kinda broken (misses lots
                // of dependencies) anyway, and can mess around with the game directory;
                // until this is fixed, only support pk3 downloads via curl, and turn off
@@ -1103,6 +1103,8 @@ void CL_BeginDownloads(qboolean aborteddownload)
                        if (cl.downloadmodel_current == 1)
                        {
                                // we now have the worldmodel so we can set up the game world
+                               // or maybe we do not have it (cl_serverextension_download 0)
+                               // then we need to continue loading ANYWAY!
                                CL_SetupWorldModel();
                                if (!cl.loadfinished && cl_joinbeforedownloadsfinish.integer)
                                {
@@ -1151,7 +1153,6 @@ void CL_BeginDownloads(qboolean aborteddownload)
                // finished loading sounds
        }
 
-skipdownloads:
        if (!cl.loadfinished)
        {
                cl.loadfinished = true;
@@ -1540,6 +1541,10 @@ void CL_ParseServerInfo (void)
 
        // parse gametype
                cl.gametype = MSG_ReadByte ();
+               // the original id singleplayer demos are bugged and contain
+               // GAME_DEATHMATCH even for singleplayer
+               if (cl.maxclients == 1 && cls.protocol == PROTOCOL_QUAKE)
+                       cl.gametype = GAME_COOP;
 
        // parse signon message
                str = MSG_ReadString ();
@@ -1639,7 +1644,7 @@ void CL_ParseServerInfo (void)
 
                Con_Printf ("Auto-recording to %s.\n", demofile);
 
-               cls.demofile = FS_Open (demofile, "wb", false, false);
+               cls.demofile = FS_OpenRealFile(demofile, "wb", false);
                if (cls.demofile)
                {
                        cls.forcetrack = -1;
@@ -2711,7 +2716,7 @@ static void CL_IPLog_Load(void)
                        text++;
                if (line[0] == '/' && line[1] == '/')
                        continue; // skip comments if anyone happens to add them
-               for (i = 0;i < len && line[i] > ' ';i++)
+               for (i = 0;i < len && !ISWHITESPACE(line[i]);i++)
                        address[i] = line[i];
                address[i] = 0;
                // skip exactly one space character