mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
filesystem: load on-disk archives like PAK and PK3 through VFS (disk-only for now)
* Track from which archive the file has been opened and provide needed functions for it
This commit is contained in:
@@ -457,10 +457,14 @@ static int FS_FileTime_DIR( searchpath_t *search, const char *filename )
|
||||
|
||||
static file_t *FS_OpenFile_DIR( searchpath_t *search, const char *filename, const char *mode, int pack_ind )
|
||||
{
|
||||
file_t *f;
|
||||
char path[MAX_SYSPATH];
|
||||
|
||||
Q_snprintf( path, sizeof( path ), "%s%s", search->filename, filename );
|
||||
return FS_SysOpen( path, mode );
|
||||
f = FS_SysOpen( path, mode );
|
||||
f->searchpath = search;
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
void FS_InitDirectorySearchpath( searchpath_t *search, const char *path, int flags )
|
||||
|
||||
Reference in New Issue
Block a user