]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
don't draw conback when the file is missing, behave as if
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 13 Jan 2010 07:15:57 +0000 (07:15 +0000)
committerRudolf Polzer <divVerent@alientrap.org>
Tue, 19 Jan 2010 17:05:58 +0000 (18:05 +0100)
scr_conbrightness is 0 in this case

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9832 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=7588ae076a3b9dcde8484b63599e90d17d6afd34

console.c

index 72e868fb19df32d2f9fdbb8b0caa4d6eb3872226..dc3ca9c50156f2765cd13ac849209d1b50c90447 100644 (file)
--- a/console.c
+++ b/console.c
@@ -1769,6 +1769,7 @@ void Con_DrawConsole (int lines)
 {
        int mask_must = 0;
        int mask_mustnot = developer.integer ? 0 : CON_MASK_DEVELOPER;
+       cachepic_t *conbackpic;
 
        if (lines <= 0)
                return;
@@ -1779,7 +1780,11 @@ void Con_DrawConsole (int lines)
        con_vislines = lines;
 
 // draw the background
-       DrawQ_Pic(0, lines - vid_conheight.integer, scr_conbrightness.value >= 0.01f ? Draw_CachePic ("gfx/conback") : NULL, vid_conwidth.integer, vid_conheight.integer, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, cls.signon == SIGNONS ? scr_conalpha.value : 1.0, 0); // always full alpha when not in game
+       conbackpic = scr_conbrightness.value >= 0.01f ? Draw_CachePic("gfx/conback") : NULL;
+       if (conbackpic && conbackpic->tex != r_texture_notexture)
+               DrawQ_Pic(0, lines - vid_conheight.integer, conbackpic, vid_conwidth.integer, vid_conheight.integer, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, cls.signon == SIGNONS ? scr_conalpha.value : 1.0f, 0); // always full alpha when not in game
+       else
+               DrawQ_Fill(0, lines - vid_conheight.integer, vid_conwidth.integer, vid_conheight.integer, 0.0f, 0.0f, 0.0f, cls.signon == SIGNONS ? scr_conalpha.value : 1.0f, 0); // always full alpha when not in game
        DrawQ_String(vid_conwidth.integer - DrawQ_TextWidth(engineversion, 0, con_textsize.value, con_textsize.value, false, FONT_CONSOLE), lines - con_textsize.value, engineversion, 0, con_textsize.value, con_textsize.value, 1, 0, 0, 1, 0, NULL, true, FONT_CONSOLE);
 
 // draw the text