]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
load csprogs.dat after it is downloaded
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 10 Jun 2007 23:49:43 +0000 (23:49 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 10 Jun 2007 23:49:43 +0000 (23:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7395 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
client.h

index 4a06924c29b283b946280d47b4798a2ad038740e..4a1dca33433d00b92fa9c9a331eea9907f23a6ed 100644 (file)
@@ -534,6 +534,11 @@ static void QW_CL_RequestNextDownload(void)
 
                // done loading
                cl.loadfinished = true;
+               if (cl.loadcsqc)
+               {
+                       cl.loadcsqc = false;
+                       CL_VM_Init();
+               }
                break;
        case dl_sound:
                if (cls.qw_downloadnumber == 0)
@@ -941,7 +946,16 @@ void CL_BeginDownloads(qboolean aborteddownload)
                 && cl_serverextension_download.integer
                 && (FS_CRCFile(csqc_progname.string, &progsize) != csqc_progcrc.integer || ((int)progsize != csqc_progsize.integer && csqc_progsize.integer != -1))
                 && !FS_FileExists(va("dlcache/%s.%i.%i", csqc_progname.string, csqc_progsize.integer, csqc_progcrc.integer)))
+               {
                        Cmd_ForwardStringToServer(va("download %s", csqc_progname.string));
+                       return;
+               }
+       }
+
+       if (cl.loadcsqc)
+       {
+               cl.loadcsqc = false;
+               CL_VM_Init();
        }
 
        if (cl.loadmodel_current < cl.loadmodel_total)
@@ -3081,7 +3095,6 @@ void CL_ParseServerMessage(void)
                        case qw_svc_serverdata:
                                //Cbuf_Execute(); // make sure any stuffed commands are done
                                CL_ParseServerInfo();
-                               CL_VM_Init();   //[515]: init csqc
                                break;
 
                        case qw_svc_setangle:
@@ -3451,7 +3464,6 @@ void CL_ParseServerMessage(void)
 
                        case svc_serverinfo:
                                CL_ParseServerInfo ();
-                               CL_VM_Init();   //[515]: init csqc
                                break;
 
                        case svc_setangle:
index 0b16a62d0a8089b5b99bf1b778e4c0231b0e46ee..d44d2d034f7d2b2abdbbbd5a33fcab9210f202d5 100644 (file)
--- a/client.h
+++ b/client.h
@@ -924,6 +924,7 @@ typedef struct client_state_s
        int downloadsound_current;
        int loadsound_total;
        qboolean downloadcsqc;
+       qboolean loadcsqc;
        qboolean loadbegun;
        qboolean loadfinished;