BSPZip and BSPPack implementation #484
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR reimplements BSPZip and BSPPack with the intention of addressing 2 key issues. The first is that increasing certain BSP limits results in being unable to build cubemaps due to the lump size differences, this is addressed by the fact that future compilations of bsppack would have the correct lump sizes. The second is a sound and shader caching issue as described here ValveSoftware/Source-1-Games#7175, this is addressed using the solution proposed here ValveSoftware#1322 meaning all mp3, wav and vcs files are not compressed.
Using the above map as a test I can confirm that that after recompressing it with the changes it now appears to work. In my case the original map would crash on the second load rather than show a black square. The map size is slightly larger at 43.1mb from 42.7mb, which is expected as mp3's and wav's don't compress very well.
The contents of bsppack.cpp were originally posted by ficool2 in the Valve Modding Community Discord so I have authored the commit under his name.
PR Checklist
developbranch OR targets another branch with a specific goal in mind