diff --git a/include/QF/render.h b/include/QF/render.h index a4c20d4c0..340bc0393 100644 --- a/include/QF/render.h +++ b/include/QF/render.h @@ -190,6 +190,7 @@ extern qboolean r_paused; extern entity_t *r_view_model; extern entity_t *r_player_entity; extern int r_lineadj; +extern qboolean r_active; void *D_SurfaceCacheAddress (void); int D_SurfaceCacheForRes (int width, int height); diff --git a/nq/source/gl_draw.c b/nq/source/gl_draw.c index cd5316228..175195872 100644 --- a/nq/source/gl_draw.c +++ b/nq/source/gl_draw.c @@ -42,12 +42,12 @@ #include "QF/console.h" #include "QF/draw.h" #include "QF/quakefs.h" +#include "QF/render.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/vid.h" #include "QF/va.h" -#include "client.h" #include "glquake.h" #include "r_cvar.h" #include "sbar.h" @@ -559,7 +559,7 @@ Draw_ConsoleBackground (int lines) ofs = (vid.conheight - lines) / (float) vid.conheight; y = vid.height * scr_consize->value; - if (cls.state != ca_active || lines > y) { + if (!r_active || lines > y) { alpha = 1.0; } else { // set up to draw alpha console diff --git a/nq/source/host.c b/nq/source/host.c index 68697443e..c16ed615d 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -710,6 +710,7 @@ _Host_Frame (float time) || cl.stats[STAT_HEALTH] <= 0); r_force_fullscreen = cl.intermission; r_paused = cl.paused; + r_active = cls.state == ca_active; r_view_model = &cl.viewent; SCR_UpdateScreen (cl.time); diff --git a/nq/source/r_main.c b/nq/source/r_main.c index de03548ff..6b4825a7a 100644 --- a/nq/source/r_main.c +++ b/nq/source/r_main.c @@ -12,6 +12,7 @@ entity_t *r_view_model; entity_t *r_player_entity; lightstyle_t r_lightstyle[MAX_LIGHTSTYLES]; int r_lineadj; +qboolean r_active; float r_time1; diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 1bdbfe41a..180c09920 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -1485,6 +1485,7 @@ Host_Frame (float time) || cl.stats[STAT_HEALTH] <= 0); r_force_fullscreen = cl.intermission; r_paused = cl.paused; + r_active = cls.state == ca_active; r_view_model = &cl.viewent; // don't allow cheats in multiplayer diff --git a/qw/source/gl_draw.c b/qw/source/gl_draw.c index cd5316228..175195872 100644 --- a/qw/source/gl_draw.c +++ b/qw/source/gl_draw.c @@ -42,12 +42,12 @@ #include "QF/console.h" #include "QF/draw.h" #include "QF/quakefs.h" +#include "QF/render.h" #include "QF/screen.h" #include "QF/sys.h" #include "QF/vid.h" #include "QF/va.h" -#include "client.h" #include "glquake.h" #include "r_cvar.h" #include "sbar.h" @@ -559,7 +559,7 @@ Draw_ConsoleBackground (int lines) ofs = (vid.conheight - lines) / (float) vid.conheight; y = vid.height * scr_consize->value; - if (cls.state != ca_active || lines > y) { + if (!r_active || lines > y) { alpha = 1.0; } else { // set up to draw alpha console diff --git a/qw/source/r_main.c b/qw/source/r_main.c index de03548ff..6b4825a7a 100644 --- a/qw/source/r_main.c +++ b/qw/source/r_main.c @@ -12,6 +12,7 @@ entity_t *r_view_model; entity_t *r_player_entity; lightstyle_t r_lightstyle[MAX_LIGHTSTYLES]; int r_lineadj; +qboolean r_active; float r_time1;