change package reference rules to not reference files that are not used (ones that were found+rejected with com_fdepthfile)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4707 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
70c3d27465
commit
433c7b24c8
2 changed files with 13 additions and 2 deletions
|
@ -915,7 +915,12 @@ int FS_FLocateFile(const char *filename, FSLF_ReturnType_e returntype, flocation
|
||||||
found = search->handle->FindFile(search->handle, loc, filename, pf);
|
found = search->handle->FindFile(search->handle, loc, filename, pf);
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
search->flags |= fs_referencetype;
|
if (returntype != FSLFRT_DEPTH_OSONLY && returntype != FSLFRT_DEPTH_ANYPATH)
|
||||||
|
{
|
||||||
|
if ((search->flags & fs_referencetype) != fs_referencetype)
|
||||||
|
Con_DPrintf("%s became referenced due to %s\n", search->purepath, filename);
|
||||||
|
search->flags |= fs_referencetype;
|
||||||
|
}
|
||||||
loc->search = search;
|
loc->search = search;
|
||||||
|
|
||||||
com_file_copyprotected = !!(search->flags & SPF_COPYPROTECTED);
|
com_file_copyprotected = !!(search->flags & SPF_COPYPROTECTED);
|
||||||
|
@ -935,7 +940,12 @@ int FS_FLocateFile(const char *filename, FSLF_ReturnType_e returntype, flocation
|
||||||
found = search->handle->FindFile(search->handle, loc, filename, pf);
|
found = search->handle->FindFile(search->handle, loc, filename, pf);
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
search->flags |= fs_referencetype;
|
if (returntype != FSLFRT_DEPTH_OSONLY && returntype != FSLFRT_DEPTH_ANYPATH)
|
||||||
|
{
|
||||||
|
if ((search->flags & fs_referencetype) != fs_referencetype)
|
||||||
|
Con_DPrintf("%s became referenced due to %s\n", search->purepath, filename);
|
||||||
|
search->flags |= fs_referencetype;
|
||||||
|
}
|
||||||
loc->search = search;
|
loc->search = search;
|
||||||
com_file_copyprotected = !!(search->flags & SPF_COPYPROTECTED);
|
com_file_copyprotected = !!(search->flags & SPF_COPYPROTECTED);
|
||||||
com_file_untrusted = !!(search->flags & SPF_UNTRUSTED);
|
com_file_untrusted = !!(search->flags & SPF_UNTRUSTED);
|
||||||
|
|
|
@ -937,6 +937,7 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
||||||
Q_snprintfz (sv.modelname, sizeof(sv.modelname), exts[i], server);
|
Q_snprintfz (sv.modelname, sizeof(sv.modelname), exts[i], server);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
COM_FCheckExists(sv.modelname);
|
||||||
sv.world.worldmodel = Mod_ForName (sv.modelname, MLV_ERROR);
|
sv.world.worldmodel = Mod_ForName (sv.modelname, MLV_ERROR);
|
||||||
}
|
}
|
||||||
if (!sv.world.worldmodel || sv.world.worldmodel->needload)
|
if (!sv.world.worldmodel || sv.world.worldmodel->needload)
|
||||||
|
|
Loading…
Reference in a new issue