Loading BSP2 maps in a single binary #1950
Merged
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 is tough. We basically split all extended structures into two versions, one with 16-bit fields for Q1BSP and HLBSP (including BSP30ext) and another with 32-bit fields for QBSP2.
What it does is allow us to use the same engine binary for all supported formats and letting custom renderers, like PrimeXT, finally support QBSP2 alongside classic BSP formats.
What it doesn't, however, allow is to re-use existing custom renderers from Half-Life 1. Most, if not all of them, will probably crash after reading world
model_t
and getting wrong offsets and pointers when QBSP2 map is loaded.Running a simple benchmark didn't show any significant drop in performance.