]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - fs.c
if a skyboxskinframe is missing, don't draw that sky surface (fixes crash if some...
[xonotic/darkplaces.git] / fs.c
diff --git a/fs.c b/fs.c
index abe57f424c7c5a4d2fb5630caab0aa182199b4af..a0dd2c8ef36a85acff3cb11265348bd6ccac52ce 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -669,7 +669,7 @@ FS_LoadPackPK3
 Create a package entry associated with a PK3 file
 ====================
 */
-pack_t *FS_LoadPackPK3FromFD (const char *packfile, int packhandle)
+pack_t *FS_LoadPackPK3FromFD (const char *packfile, int packhandle, qboolean silent)
 {
        pk3_endOfCentralDir_t eocd;
        pack_t *pack;
@@ -677,7 +677,8 @@ pack_t *FS_LoadPackPK3FromFD (const char *packfile, int packhandle)
 
        if (! PK3_GetEndOfCentralDir (packfile, packhandle, &eocd))
        {
-               Con_Printf ("%s is not a PK3 file\n", packfile);
+               if(!silent)
+                       Con_Printf ("%s is not a PK3 file\n", packfile);
                close(packhandle);
                return NULL;
        }
@@ -731,7 +732,7 @@ pack_t *FS_LoadPackPK3 (const char *packfile)
 #endif
        if (packhandle < 0)
                return NULL;
-       return FS_LoadPackPK3FromFD(packfile, packhandle);
+       return FS_LoadPackPK3FromFD(packfile, packhandle, false);
 }
 
 
@@ -1626,7 +1627,7 @@ void FS_Init_SelfPack (void)
        fs_mempool = Mem_AllocPool("file management", 0, NULL);
        if(com_selffd >= 0)
        {
-               fs_selfpack = FS_LoadPackPK3FromFD(com_argv[0], com_selffd);
+               fs_selfpack = FS_LoadPackPK3FromFD(com_argv[0], com_selffd, true);
                if(fs_selfpack)
                {
                        char *buf, *q;