@MuadDib: Fix-detection-of-expanded-menu-mod

This commit is contained in:
Simon 2023-03-10 17:54:58 +00:00
parent fce7d4865a
commit 25f46bbf52
3 changed files with 7 additions and 1 deletions

View file

@ -305,7 +305,7 @@ void VR_Init()
vr_use_gesture_boundary = Cvar_Get ("vr_use_gesture_boundary", "0.35", CVAR_ARCHIVE);
cvar_t *expanded_menu_enabled = Cvar_Get ("expanded_menu_enabled", "0", CVAR_ARCHIVE);
if (FS_FileExists("expanded_menu.pk3")) {
if (FS_FileExists("expanded_menu.pk3") || FS_BaseFileExists("expanded_menu.pk3")) {
Cvar_Set( "expanded_menu_enabled", "1" );
} else {
Cvar_Set( "expanded_menu_enabled", "0" );

View file

@ -751,6 +751,11 @@ qboolean FS_FileExists( const char *file )
return FS_FileInPathExists(FS_BuildOSPath(fs_homepath->string, fs_gamedir, file));
}
qboolean FS_BaseFileExists( const char *file )
{
return FS_FileInPathExists(FS_BuildOSPath(fs_homepath->string, BASEGAME, file));
}
/*
================
FS_SV_FileExists

View file

@ -464,6 +464,7 @@ void FS_Rmdir( const char *osPath, qboolean recursive );
void FS_HomeRmdir( const char *homePath, qboolean recursive );
qboolean FS_FileExists( const char *file );
qboolean FS_BaseFileExists( const char *file );
char *FS_BuildOSPath( const char *base, const char *game, const char *qpath );