From 8d6d071fbb6468c95a7df2be6aaa59a14e84e755 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 12 Jun 2017 14:06:59 -0600 Subject: [PATCH] fix check for mods menu --- quakespasm/Quake/common.c | 1 + quakespasm/Quake/menu.c | 18 +++++++++++++----- quakespasm/Quake/menu.h | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/quakespasm/Quake/common.c b/quakespasm/Quake/common.c index 05ab4615..8e8e3f7f 100644 --- a/quakespasm/Quake/common.c +++ b/quakespasm/Quake/common.c @@ -2202,6 +2202,7 @@ static void COM_Game_f (void) TexMgr_NewGame (); Draw_NewGame (); R_NewGame (); + M_NewGame (); } ExtraMaps_NewGame (); DemoList_Rebuild (); diff --git a/quakespasm/Quake/menu.c b/quakespasm/Quake/menu.c index 5ff5b94a..08c7f5e1 100644 --- a/quakespasm/Quake/menu.c +++ b/quakespasm/Quake/menu.c @@ -2674,16 +2674,24 @@ void M_Init (void) Cmd_AddCommand ("help", M_Menu_Help_f); Cmd_AddCommand ("menu_quit", M_Menu_Quit_f); - // ericw -- check for graphics for mods menu - if (COM_FileExists("gfx/p_mod.lmp", NULL) - && COM_FileExists("gfx/mainmenu2.lmp", NULL) - && !COM_CheckParm("-nomodmenu")) + M_NewGame (); +} + +void M_NewGame (void) +{ +// ericw -- check for graphics for mods menu + if (COM_FileExists ("gfx/p_mod.lmp", NULL) + && COM_FileExists ("gfx/mainmenu2.lmp", NULL) + && !COM_CheckParm ("-nomodmenu")) { m_have_mods_menu = true; } + else + { + m_have_mods_menu = false; + } } - void M_Draw (void) { if (m_state == m_none || key_dest != key_menu) diff --git a/quakespasm/Quake/menu.h b/quakespasm/Quake/menu.h index e8b03016..763db766 100644 --- a/quakespasm/Quake/menu.h +++ b/quakespasm/Quake/menu.h @@ -53,6 +53,7 @@ extern qboolean m_entersound; // menus // void M_Init (void); +void M_NewGame (void); void M_Keydown (int key); void M_Charinput (int key); qboolean M_TextEntry (void);