diff --git a/nq/source/cl_screen.c b/nq/source/cl_screen.c index 6d2597b55..30b515832 100644 --- a/nq/source/cl_screen.c +++ b/nq/source/cl_screen.c @@ -78,29 +78,32 @@ static SCR_Func scr_funcs_normal[] = { static SCR_Func scr_funcs_intermission[] = { Sbar_IntermissionOverlay, + Con_DrawConsole, 0 }; static SCR_Func scr_funcs_finale[] = { Sbar_FinaleOverlay, + Con_DrawConsole, 0, }; +static SCR_Func *scr_funcs[] = { + scr_funcs_normal, + scr_funcs_intermission, + scr_funcs_finale, +}; + void CL_UpdateScreen (double realtime) { - SCR_Func *scr_funcs = scr_funcs_normal; + unsigned index = cl.intermission; + + if (index > sizeof (scr_funcs) / sizeof (scr_funcs[0])) + index = 0; cl_wateralpha = r_wateralpha->value; - if (r_force_fullscreen /*FIXME better test*/ == 1 - && key_dest == key_game) { - scr_funcs = scr_funcs_intermission; - } else if (r_force_fullscreen /*FIXME better test*/ == 2 - && key_dest == key_game) { - scr_funcs = scr_funcs_finale; - } - V_PrepBlend (); - SCR_UpdateScreen (realtime, scr_funcs); + SCR_UpdateScreen (realtime, scr_funcs[index]); } diff --git a/qw/source/cl_screen.c b/qw/source/cl_screen.c index d42e0493e..afbf398ae 100644 --- a/qw/source/cl_screen.c +++ b/qw/source/cl_screen.c @@ -84,18 +84,29 @@ static SCR_Func scr_funcs_normal[] = { static SCR_Func scr_funcs_intermission[] = { Sbar_IntermissionOverlay, + Con_DrawConsole, 0 }; static SCR_Func scr_funcs_finale[] = { Sbar_FinaleOverlay, + Con_DrawConsole, 0, }; +static SCR_Func *scr_funcs[] = { + scr_funcs_normal, + scr_funcs_intermission, + scr_funcs_finale, +}; + void CL_UpdateScreen (double realtime) { - SCR_Func *scr_funcs = scr_funcs_normal; + unsigned index = cl.intermission; + + if (index > sizeof (scr_funcs) / sizeof (scr_funcs[0])) + index = 0; // don't allow cheats in multiplayer if (r_active) { @@ -105,16 +116,8 @@ CL_UpdateScreen (double realtime) cl_wateralpha = 1.0; } - if (r_force_fullscreen /*FIXME better test*/ == 1 - && key_dest == key_game) { - scr_funcs = scr_funcs_intermission; - } else if (r_force_fullscreen /*FIXME better test*/ == 2 - && key_dest == key_game) { - scr_funcs = scr_funcs_finale; - } - V_PrepBlend (); - SCR_UpdateScreen (realtime, scr_funcs); + SCR_UpdateScreen (realtime, scr_funcs[index]); } void