diff --git a/engine/common/fs.c b/engine/common/fs.c index ceb2d96fe..ffa67b8c3 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -915,7 +915,12 @@ int FS_FLocateFile(const char *filename, FSLF_ReturnType_e returntype, flocation found = search->handle->FindFile(search->handle, loc, filename, pf); 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; 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); 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; com_file_copyprotected = !!(search->flags & SPF_COPYPROTECTED); com_file_untrusted = !!(search->flags & SPF_UNTRUSTED); diff --git a/engine/server/sv_init.c b/engine/server/sv_init.c index 264fa49de..6df90bae0 100644 --- a/engine/server/sv_init.c +++ b/engine/server/sv_init.c @@ -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); } } + COM_FCheckExists(sv.modelname); sv.world.worldmodel = Mod_ForName (sv.modelname, MLV_ERROR); } if (!sv.world.worldmodel || sv.world.worldmodel->needload)