From: black Date: Sat, 7 Aug 2004 23:21:54 +0000 (+0000) Subject: -Fixed a bad bugfix in the menu router. X-Git-Tag: xonotic-v0.1.0preview~5764 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=e9dde8a62e1c73130c5a687bec8e41e10266cd6d;p=xonotic%2Fdarkplaces.git -Fixed a bad bugfix in the menu router. -Added read-only support for files outside of data/ to the new vm. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4309 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/menu.c b/menu.c index caaf255d..fc8d6551 100644 --- a/menu.c +++ b/menu.c @@ -4215,10 +4215,10 @@ void MR_Init() Cvar_SetValueQuick(&forceqmenu,1); // use -useqmenu for debugging proposes, cause it starts // the normal quake menu only the first time - else if(COM_CheckParm("-useqmenu")) + if(COM_CheckParm("-useqmenu")) MR_SetRouting (TRUE); - - MR_SetRouting (FALSE); + else + MR_SetRouting (FALSE); } diff --git a/prvm_cmds.c b/prvm_cmds.c index 22719563..6a7fc7d4 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -1746,6 +1746,9 @@ void VM_fopen(void) return; } VM_FILES[filenum] = FS_Open(va("data/%s", filename), modestring, false); + if (VM_FILES[filenum] == NULL && mode == 0) + VM_FILES[filenum] = FS_Open(va("%s", filename), modestring, false); + if (VM_FILES[filenum] == NULL) PRVM_G_FLOAT(OFS_RETURN) = -1; else