From 330cbcdb2032b29d676d55d888f0dd93f0495d91 Mon Sep 17 00:00:00 2001 From: Shpoike Date: Sun, 13 Aug 2023 02:33:52 +0100 Subject: [PATCH] Try to fix up some manifest quirks... --- engine/common/fs.c | 18 ++++++++---------- games/fortressone.fmf | 2 +- games/quake-demo.fmf | 1 + games/xonotic_85.fmf | 6 +++--- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/engine/common/fs.c b/engine/common/fs.c index aedcf7077..d772ae13c 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -1217,6 +1217,7 @@ static void FS_Manifest_SetDefaultSettings(ftemanifest_t *man, const gamemode_in //read a manifest file ftemanifest_t *FS_Manifest_ReadMem(const char *fname, const char *basedir, const char *data) { + int ver; int i; ftemanifest_t *man; if (!data) @@ -1260,17 +1261,13 @@ ftemanifest_t *FS_Manifest_ReadMem(const char *fname, const char *basedir, const } } -#ifdef SVNREVISION //svnrevision is often '-', which means we can't just use it as a constant. + ver = revision_number(false); + if (ver && (man->minver > ver || (man->maxver && man->maxver < ver))) { - int ver = atoi(STRINGIFY(SVNREVISION)); - if (man->minver > ver || (man->maxver && man->maxver < ver)) - { - FS_Manifest_Free(man); - return NULL; - } + FS_Manifest_Free(man); + return NULL; } -#endif return man; } @@ -6493,6 +6490,7 @@ qboolean FS_ChangeGame(ftemanifest_t *man, qboolean allowreloadconfigs, qboolean if (!man) { + int found = 0; //if we're already running a game, don't autodetect. if (fs_manifest) return false; @@ -6501,7 +6499,7 @@ qboolean FS_ChangeGame(ftemanifest_t *man, qboolean allowreloadconfigs, qboolean if (!man) { - int found = FS_EnumerateKnownGames(FS_FoundManifest, &man); + found = FS_EnumerateKnownGames(FS_FoundManifest, &man); if (found != 1) { //we found more than 1 (or none) @@ -6522,7 +6520,7 @@ qboolean FS_ChangeGame(ftemanifest_t *man, qboolean allowreloadconfigs, qboolean { #ifdef _WIN32 //quit straight out on windows. this prevents shitty sandboxed malware scanners from seeing bugs in opengl drivers and blaming us for it. - if (!fixedbasedir) + if (!fixedbasedir && found == 0) Sys_Error("No recognised game data found in working directory:\n%s", com_gamepath); #endif man = FS_Manifest_ReadMem(NULL, NULL, diff --git a/games/fortressone.fmf b/games/fortressone.fmf index 3c087b957..0220da32f 100644 --- a/games/fortressone.fmf +++ b/games/fortressone.fmf @@ -11,6 +11,6 @@ mainconfig "fo.cfg" //see quake-demo.fmf archivedpackage id1/pak0.pak 0x4f069cac id1/pak0.pak https://updates.triptohell.info/moodles/live/QUAKE_SW.zip -//this is made complicated because we can't just use the pk3 as-is etc. +//this is made complicated because we can't just use the pk3 as-is etc (engine will sandbox the menuqc if not signed). package fortress/fortressone.pk3 mirror "https://github.com/FortressOne/fte-config/releases/download/1.1.1-beta.1/fortressone-fte-linux-1.1.1-beta.1-portable.zip" crc 0x7d74337f prefix "/FortressOne/fortress" filesize 197849205 sha512 "42a0deaa571f30c56dac08603d94d968a603a6c2d64db29473cb25f7e1db29fe63260cc8cda2e41dbbb3decd5e1c5440aa6bbceeae45c3225dad359fe0559021" signature "Spike:OrVRb1AuVmPGSmPlMS37DmEs1UIOeAZpSFj8s9jweUDbSqbkBnY6+5tBI43MxqDtIRMhK1+zDoaRxyvR2HErks2hf1wVoDnwpVACi893tvhSKQ0yfKUfkdpqm8aQM7AU/22ZGj5zav6RtxoX+np/7rzfET0fHzCSaQS1d6/TeJaQ5rMPX13Bgu0CenuOD1rvVNXXPMD5d887Kd+y/kz4OVUH0/xkjua5LHsWwDroC5AwzQI/EsWbcJx+xppihKNdMboAr51dALDuWLeSYzswPoJZWppv9D0WbjLohiZU04gmys7JdLn1cclz5MvIinLNFK//adQHrISqDFJqBygni8k90A0BNwSjdVzf9f4bYtzwS5qFRNgYtONyb380cpFZtMMKLdLRne1K8Y4FljzaJztcbm5qBQCLjAaK+C405tUDddDToCyyGsO6Zxf7yzhlSXNTWv/qRgKx91w5pJNyACgYnspxr+xOX+6ewchZZi07uPOPwVrxoAkuIrkiJtUe" diff --git a/games/quake-demo.fmf b/games/quake-demo.fmf index 79e168195..c5aff59af 100644 --- a/games/quake-demo.fmf +++ b/games/quake-demo.fmf @@ -5,6 +5,7 @@ FTEManifestVer 1 game quake +name Quake //the shareware license requires distribution in whole... so we'll just download the whole shareware zip and extract only what we need - assuming the user does not already have a copy. archivedpackage id1/pak0.pak 0x4f069cac id1/pak0.pak https://fte.triptohell.info/moodles/live/QUAKE_SW.zip diff --git a/games/xonotic_85.fmf b/games/xonotic_85.fmf index f9acb100f..1d7e7f869 100644 --- a/games/xonotic_85.fmf +++ b/games/xonotic_85.fmf @@ -2,7 +2,7 @@ //+prefixed lines are inserted AFTER default.cfg and will thus conflict/override the mod's own settings game xonotic -name "FTE Xonotic (0.8.5)" +name "FTEized Xonotic (0.8.5)" protocolname "Xonotic" basegame data basegame *ftedata //so stuff gets written here instead. @@ -16,7 +16,7 @@ package "data/xonotic-20220627-music.pk3" crc 0x5d1dd373 mirror "unzip:Xonotic package "data/xonotic-20220627-nexcompat.pk3" crc 0x83f613b9 mirror "unzip:Xonotic/data/xonotic-20220627-nexcompat.pk3,https://github.com/garymoon/xonotic/releases/download/xonotic-v0.8.5/xonotic-0.8.5.zip" //This sucks. overrides the *.dat files to work around gmqcc bugs (also smaller dat files at runtime, but still stupid and annoying and means compat hits the fan when using the standard csprogs on dp servers) -package "data/xonotic-fixups-0.8.5.zip" crc 0xe27b8ad3 mirror "xonotic-fixups-0.8.5.pk3" +package "data/xonotic-fixups-0.8.5.pk3" crc 0xe27b8ad3 //mirror "xonotic-fixups-0.8.5.pk3" //-set pr_fixbrokenqccarrays 2 //this can be used instead, but can cause its own problems. @@ -38,7 +38,7 @@ package "data/xonotic-fixups-0.8.5.zip" crc 0xe27b8ad3 mirror "xonotic-fixups-0. -if ($dedicated < 1) then set qport 654 //xonotic expects this cvar to exist only in clients (and uses it to detect client vs dedicated server). this entirely ignores 'setrenderer sv' of course. good luck with that one. --set gl_info_extensions "GL_EXT_texture_compression_s3tc GL_ARB_texture_compression" //fte doesn't have a cvar that contains opengl extensions, in part because they don't apply to other renderers, thus making it kinda useless. and xonotic likes spamming warning messages, even though they're invalid half the time, and impossible for a user to work around the rest of the time. +-set gl_info_extensions "GL_EXT_texture_compression_s3tc GL_ARB_texture_compression" //fte doesn't have a cvar that contains opengl extensions, in part because they don't apply to other renderers thus making it kinda useless. and xonotic likes spamming warning messages, even though they're invalid half the time, and impossible for a user to work around the rest of the time. -set cl_movement 1 //xonotic's physics are inconsistent with itself, but it judders even without prediction so we might as well enable it -set cl_movement_replay "" //just to silence spam. actual value doesn't change anything in fte, and xonotic keeps changing it randomly anyway.