mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 08:41:11 +00:00
Prepend qfs_ to file_from_pak.
A little better name-spacing.
This commit is contained in:
parent
53d267c030
commit
e5148493db
3 changed files with 8 additions and 4 deletions
|
@ -97,7 +97,7 @@ extern const char *qfs_userpath;
|
||||||
|
|
||||||
Set by QFS_FOpenFIle() and _QFS_FOpenFile().
|
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().
|
/** 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
|
\note It is a fatal error for \a end to be non-null but not in the list
|
||||||
of vpaths.
|
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 fname The name of the file to be searched for.
|
||||||
\param start The first vpath (gamedir) to search.
|
\param start The first vpath (gamedir) to search.
|
||||||
\param end The last vpath (gamedir) to search.
|
\param end The last vpath (gamedir) to search.
|
||||||
|
|
|
@ -1010,7 +1010,7 @@ QFS_CompressPath (const char *pth)
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
VISIBLE int file_from_pak; // global indicating file came from pack file ZOID
|
VISIBLE int qfs_file_from_pak;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
QFS_FOpenFile
|
QFS_FOpenFile
|
||||||
|
@ -1023,7 +1023,7 @@ static void
|
||||||
open_file (int_findfile_t *found, QFile **gzfile, dstring_t *foundname,
|
open_file (int_findfile_t *found, QFile **gzfile, dstring_t *foundname,
|
||||||
int zip)
|
int zip)
|
||||||
{
|
{
|
||||||
file_from_pak = found->ff.in_pak;
|
qfs_file_from_pak = found->ff.in_pak;
|
||||||
if (foundname) {
|
if (foundname) {
|
||||||
dstring_copystr (foundname, found->ff.realname);
|
dstring_copystr (foundname, found->ff.realname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -764,7 +764,7 @@ SV_BeginDownload_f (void *unused)
|
||||||
if (!host_client->download
|
if (!host_client->download
|
||||||
// ZOID: special check for maps, if it came from a pak file, don't
|
// ZOID: special check for maps, if it came from a pak file, don't
|
||||||
// allow download
|
// allow download
|
||||||
|| (strncmp (name, "maps/", 5) == 0 && file_from_pak)) {
|
|| (strncmp (name, "maps/", 5) == 0 && qfs_file_from_pak)) {
|
||||||
if (host_client->download) {
|
if (host_client->download) {
|
||||||
Qclose (host_client->download);
|
Qclose (host_client->download);
|
||||||
host_client->download = NULL;
|
host_client->download = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue