]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix crash when playing some demos
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 4 Apr 2009 20:01:58 +0000 (20:01 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 4 Apr 2009 20:01:58 +0000 (20:01 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8861 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c

index 80d11efb6650450ae95ebd4bca61da09d5f4c76c..7f0704c6662aaed7587605cecdc519d05b3146ee 100644 (file)
@@ -992,6 +992,8 @@ void CL_BeginDownloads(qboolean aborteddownload)
 
        // if we got here...
        // curl is done, so let's start with the business
 
        // if we got here...
        // curl is done, so let's start with the business
+       if(!cl.loadbegun)
+               SCR_PushLoadingScreen(false, "Loading precaches", 1);
        cl.loadbegun = true;
 
        // if already downloading something from the previous level, don't stop it
        cl.loadbegun = true;
 
        // if already downloading something from the previous level, don't stop it
@@ -1214,10 +1216,7 @@ void CL_BeginDownloads_f(void)
        if(cl.loadbegun)
                Con_Printf("cl_begindownloads is only valid once per match\n");
        else
        if(cl.loadbegun)
                Con_Printf("cl_begindownloads is only valid once per match\n");
        else
-       {
-               SCR_PushLoadingScreen(false, "Loading precaches", 1);
                CL_BeginDownloads(false);
                CL_BeginDownloads(false);
-       }
 }
 
 void CL_StopDownload(int size, int crc)
 }
 
 void CL_StopDownload(int size, int crc)
@@ -1448,10 +1447,7 @@ static void CL_SignonReply (void)
                        //MSG_WriteString (&cls.netcon->message, "prespawn");
                }
                else // playing a demo...  make sure loading occurs as soon as possible
                        //MSG_WriteString (&cls.netcon->message, "prespawn");
                }
                else // playing a demo...  make sure loading occurs as soon as possible
-               {
-                       SCR_PushLoadingScreen(false, "Loading precaches", 1);
                        CL_BeginDownloads(false);
                        CL_BeginDownloads(false);
-               }
                break;
 
        case 2:
                break;
 
        case 2: