From 725a32a4d6572815446af09cccec9815bda4dd58 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Sat, 16 Jul 2022 16:51:37 -0700 Subject: [PATCH] Menu-FN: Set up pkgname defaults for 'valve', so that the menu will go straight to the updater. --- src/menu-fn/entry.qc | 4 +--- src/menu-fn/m_customgame.qc | 14 +++++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/menu-fn/entry.qc b/src/menu-fn/entry.qc index eae1b7a4..11296750 100644 --- a/src/menu-fn/entry.qc +++ b/src/menu-fn/entry.qc @@ -141,14 +141,12 @@ m_init(void) Music_MenuStart(); } -#if 0 if (games[gameinfo_current].pkgfile != "") - if (!whichpack(games[gameinfo_current].pkgfile) || autocvar_menu_updating) { + if not (whichpack(games[gameinfo_current].pkgfile) || autocvar_menu_updating) { /* reload in case of video restarts? */ shaderforname("logo_avi", "{\n{\nvideomap av:media/logo.avi\n}\n}"); g_menupage = PAGE_UPDATES; } -#endif Menu_AutoScale(); Menu_GammaHack(); diff --git a/src/menu-fn/m_customgame.qc b/src/menu-fn/m_customgame.qc index 9a77cfbc..b3f9b325 100644 --- a/src/menu-fn/m_customgame.qc +++ b/src/menu-fn/m_customgame.qc @@ -32,7 +32,6 @@ CMainButton customgame_btnDone; int g_iModInstallCache; string g_strModInstallCache; - #if 1 /* get installing id */ void @@ -701,6 +700,16 @@ customgame_lbmods_changed(void) } } +/* set some sane default packages, so that we don't need to ship a custom liblist */ +void +games_setdefaultpkgs(int id) +{ + if (games[id].gamedir == "valve") { + games[id].pkgname = "valve_dayone;valve_uplink;valve_realmedia;valve_opfordemo;valve_hlds;valve_patch1110;addon_furtherdata;addon_holidaymodels"; + games[id].pkgfile = "maps/crossfire.bsp"; + } +} + void games_init_2(void) { @@ -764,6 +773,8 @@ games_init_2(void) games[id].pkgid = -1; games[id].steambg = 0; + games_setdefaultpkgs(id); + if (games_check_manifest(id, gamedirname) == 1) { NSLog("[MENU] Found manifest for %s", gamedirname); games[id].info_type = GAMEINFO_MANIFEST; @@ -824,6 +835,7 @@ games_init(void) games[id].pkgid = -1; games[id].steambg = 0; gameinfo_current = 0; + games_setdefaultpkgs(id); #ifndef WEBMENU if (games_check_manifest(id, gamedirname) == 1) {