Menu-FN: treat 'ftehl' the same as 'valve' when indexing MP levels

This commit is contained in:
Marco Cawthorne 2023-02-16 17:55:16 -08:00
parent c3c94b48a6
commit 27105fc996
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -196,12 +196,17 @@ menu_creategame_init(void)
g_mapcount = search_getsize(mapsearch); g_mapcount = search_getsize(mapsearch);
for (i = 0; i < g_mapcount; i++) { for (i = 0; i < g_mapcount; i++) {
string tmp, dir; string tmp, dir;
string gdir = games[gameinfo_current].gamedir;
int list = TRUE; int list = TRUE;
tmp = substring(search_getfilename(mapsearch, i), 5, -1); tmp = substring(search_getfilename(mapsearch, i), 5, -1);
/* work around FTEQW's path choice */
if (gdir == "ftehl")
gdir = "valve";
/* only look for maps in the current gamedir, requires SEARCH_FULLPACKAGE */ /* only look for maps in the current gamedir, requires SEARCH_FULLPACKAGE */
dir = substring(search_getpackagename(mapsearch, i), 0, strlen(games[gameinfo_current].gamedir)); dir = substring(search_getpackagename(mapsearch, i), 0, strlen(gdir));
if (dir != games[gameinfo_current].gamedir) { if (dir != gdir) {
continue; continue;
} }