small cleanup and bugfix for zlib->abail_zlip

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1576 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-11-21 21:09:11 +00:00
parent 277d0b6960
commit cdb82f3316

View file

@ -411,7 +411,7 @@ void *com_pathforfile; //fread and stuff is preferable if null
#define ZEXPORT VARGS
#ifdef ZLIB
#ifdef AVAIL_ZLIB
#ifdef _WIN32
#pragma comment( lib, "../libs/zlib.lib" )
#endif
@ -1680,7 +1680,7 @@ void COM_AddGameDirectory (char *dir, unsigned int loadstuff)
if (loadstuff & 2)
COM_AddDataFiles("pak", &packfilefuncs);//q1/hl/h2/q2
//pk2s never existed.
#ifdef ZLIB
#ifdef AVAIL_ZLIB
if (loadstuff & 4)
COM_AddDataFiles("pk3", &zipfilefuncs); //q3 + offspring
if (loadstuff & 8)
@ -1790,30 +1790,6 @@ void COM_Gamedir (char *dir)
while (com_searchpaths != com_base_searchpaths)
{
com_searchpaths->funcs->ClosePath(com_searchpaths->handle);
/*
switch(com_searchpaths->type)
{
case SPT_PACK:
fclose (com_searchpaths->u.pack->handle);
Z_Free (com_searchpaths->u.pack->files);
#ifdef HASH_FILESYSTEM
Z_Free (com_searchpaths->u.pack->hash.bucket);
#endif
Z_Free (com_searchpaths->u.pack);
break;
#ifdef ZLIB
case SPT_ZIP:
unzClose(com_searchpaths->u.zip->handle);
Z_Free (com_searchpaths->u.zip->files);
#ifdef HASH_FILESYSTEM
Z_Free (com_searchpaths->u.zip->hash.bucket);
#endif
Z_Free (com_searchpaths->u.zip);
break;
#endif
case SPT_OS:
break;
}*/
next = com_searchpaths->next;
Z_Free (com_searchpaths);
com_searchpaths = next;