1
0
Fork 0
forked from fte/fteqw

fix to FS_OpenVFS with skins

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2082 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2006-03-11 05:12:33 +00:00
parent d90a582a5c
commit f9ea81d7cf

View file

@ -1822,6 +1822,12 @@ vfsfile_t *FS_OpenVFS(char *filename, char *mode, int relativeto)
else
snprintf(fullname, sizeof(fullname), "%s%s/%s", com_quakedir, gamedirfile, filename);
break;
case FS_SKINS:
if (*com_homedir)
snprintf(fullname, sizeof(fullname), "%s%s/skins/%s", com_homedir, gamedirfile, filename);
else
snprintf(fullname, sizeof(fullname), "%s%s/skins/%s", com_quakedir, gamedirfile, filename);
break;
case FS_BASE:
if (*com_homedir)
{
@ -1843,7 +1849,7 @@ vfsfile_t *FS_OpenVFS(char *filename, char *mode, int relativeto)
snprintf(fullname, sizeof(fullname), "%sfte/%s", com_quakedir, filename);
return VFSOS_Open(fullname, mode);
default:
Sys_Error("FS_CreatePath: Bad relative path");
Sys_Error("FS_OpenVFS: Bad relative path (%i)", relativeto);
break;
}
@ -2007,7 +2013,7 @@ void FS_CreatePath(char *pname, int relativeto)
snprintf(fullname, sizeof(fullname), "%sfte/%s", com_quakedir, pname);
break;
default:
Sys_Error("FS_CreatePath: Bad relative path");
Sys_Error("FS_CreatePath: Bad relative path (%i)", relativeto);
break;
}
COM_CreatePath(fullname);