- fix Q3 shaders coming from a curled pk3
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 4 Apr 2009 20:40:38 +0000 (20:40 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 4 Apr 2009 20:40:38 +0000 (20:40 +0000)
- drawing a black bar below the download bar to make sure

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8863 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
cl_screen.c

index 7f0704c..3d06881 100644 (file)
@@ -1045,6 +1045,13 @@ void CL_BeginDownloads(qboolean aborteddownload)
                                continue;
                        }
                        CL_KeepaliveMessage(true);
+
+                       if(cl.loadmodel_current == 1)
+                       {
+                               // they'll be soon loaded, but make sure we apply freshly downloaded shaders from a curled pk3
+                               Mod_FreeQ3Shaders();
+                       }
+
                        cl.model_precache[cl.loadmodel_current] = Mod_ForName(cl.model_name[cl.loadmodel_current], false, false, cl.model_name[cl.loadmodel_current][0] == '*' ? cl.model_name[1] : NULL);
                        SCR_PopLoadingScreen(false);
                        if (cl.model_precache[cl.loadmodel_current] && cl.model_precache[cl.loadmodel_current]->Draw && cl.loadmodel_current == 1)
@@ -1109,9 +1116,11 @@ void CL_BeginDownloads(qboolean aborteddownload)
                {
                        if (aborteddownload)
                        {
+
                                if (cl.downloadmodel_current == 1)
                                {
                                        // the worldmodel failed, but we need to set up anyway
+                                       Mod_FreeQ3Shaders();
                                        CL_SetupWorldModel();
                                        if (!cl.loadfinished && cl_joinbeforedownloadsfinish.integer)
                                        {
@@ -1141,6 +1150,13 @@ void CL_BeginDownloads(qboolean aborteddownload)
                                        return;
                                }
                        }
+
+                       if(cl.loadmodel_current == 1)
+                       {
+                               // they'll be soon loaded, but make sure we apply freshly downloaded shaders from a curled pk3
+                               Mod_FreeQ3Shaders();
+                       }
+
                        cl.model_precache[cl.downloadmodel_current] = Mod_ForName(cl.model_name[cl.downloadmodel_current], false, false, cl.model_name[cl.downloadmodel_current][0] == '*' ? cl.model_name[1] : NULL);
                        if (cl.downloadmodel_current == 1)
                        {
index bfd5ed0..0a9f466 100644 (file)
@@ -1678,6 +1678,7 @@ static float SCR_DrawLoadingStack_r(loadingscreenstack_t *s, float y)
                        len = strlen(s->msg);
                        x = (vid_conwidth.integer - DrawQ_TextWidth_Font(s->msg, len, true, FONT_INFOBAR) * size) / 2;
                        y -= size;
+                       DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, 1, 0);
                        DrawQ_String_Font(x, y, s->msg, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
                        total += size;
                }