]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
split FS_Open into FS_OpenRealFile and FS_OpenVirtualFile (read-only),
[xonotic/darkplaces.git] / cl_parse.c
index d6423d1bb28d64668aed0794d1374ec5faa203f0..d5cb5896af55d0020af023d9f3fa8c1548bf76bc 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;
@@ -1639,7 +1640,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;