[quake3-bugzilla] [Bug 5298] Support for .pk3dir

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Sun Jul 8 10:44:12 EDT 2012


https://bugzilla.icculus.org/show_bug.cgi?id=5298

--- Comment #6 from Andrew <dersaidin at gmail.com> 2012-07-08 10:44:08 EDT ---
(In reply to comment #4)
> (In reply to comment #3)
> > I had to revert the patch. Apparently there's a problem where the code gets
> > stuck in an infinite loop.
> 
> I didn't reproduce this error, but I see an infinite loop.  If you take "if
> (pakwhich)" and the FS_LoadZipFile call fails, it will keep retrying the loop
> with the same check.  pakfilesi and pakdirsi are never incremented if the
> FS_LoadZipFile call fails.
> 
> I think the solution to the infinite loop is to increment pakfilesi:
> 
> if (pakwhich) {
>     // The next .pk3 file is before the next .pk3dir
>     pakfile = FS_BuildOSPath(path, dir, pakfiles[pakfilesi]);
>     if ((pak = FS_LoadZipFile(pakfile, pakfiles[pakfilesi])) == 0) {
>         // Invalid *.pk3.  Skip it and go on to the next pk3/pk3dir.
>         pakfilesi++;
>         continue;
>     }

I agree with this fix, and tested it. I also made the loop a little more
robust.



(In reply to comment #5)
> TBH I'd reject this feature. Just add a Makefile, script or whatever to your
> assets that zips your files and copies the archive to the q3 dir automatically.

This is a much better option. Viewing things in game is essential, artists do
it continually. Artists want to minimize this loop, not waste time reassembling
a bunch of pk3s each time. Think of how awesome it is to have incremental
builds when you are developing code. I think it is a very worthwhile feature.

-- 
Configure bugmail: https://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list