Prepend qfs_ to file_from_pak.

A little better name-spacing.
This commit is contained in:
Bill Currie 2013-11-24 14:10:26 +09:00
parent 53d267c030
commit e5148493db
3 changed files with 8 additions and 4 deletions

View file

@ -97,7 +97,7 @@ extern const char *qfs_userpath;
Set by QFS_FOpenFIle() and _QFS_FOpenFile().
*/
extern int file_from_pak;
extern int qfs_file_from_pak;
/** The size of the file found via QFS_FOpenFIle() or _QFS_FOpenFile().
@ -147,6 +147,10 @@ void QFS_Gamedir (const char *gamedir);
\note It is a fatal error for \a end to be non-null but not in the list
of vpaths.
\warning The returned pointer is to a static instance of findfile_t and
thus will be overwritten on the next call to any of the search
functions (QFS_FindFile, QFS_FOpenFIle, _QFS_FOpenFile)
\param fname The name of the file to be searched for.
\param start The first vpath (gamedir) to search.
\param end The last vpath (gamedir) to search.

View file

@ -1010,7 +1010,7 @@ QFS_CompressPath (const char *pth)
return path;
}
VISIBLE int file_from_pak; // global indicating file came from pack file ZOID
VISIBLE int qfs_file_from_pak;
/*
QFS_FOpenFile
@ -1023,7 +1023,7 @@ static void
open_file (int_findfile_t *found, QFile **gzfile, dstring_t *foundname,
int zip)
{
file_from_pak = found->ff.in_pak;
qfs_file_from_pak = found->ff.in_pak;
if (foundname) {
dstring_copystr (foundname, found->ff.realname);
}

View file

@ -764,7 +764,7 @@ SV_BeginDownload_f (void *unused)
if (!host_client->download
// ZOID: special check for maps, if it came from a pak file, don't
// allow download
|| (strncmp (name, "maps/", 5) == 0 && file_from_pak)) {
|| (strncmp (name, "maps/", 5) == 0 && qfs_file_from_pak)) {
if (host_client->download) {
Qclose (host_client->download);
host_client->download = NULL;