I created a new chunk in POF CS2 - the Shield Collision Tree (SLDC chunk ID). I just wrote, tested and commited FS2 engine support.
Some of you may have heard of this, some of you may have not - so I'll go through it.
When FS2 loads the SHLD (Shield) chunk it loads all the shield geometry into "Shield Info" but then it creates 8 octents (a shield triangle may appear in more than one). When it's checking the shields of a ship it checks every shield triangle in each octent until it gets a collision. So... best case scenario it has exactly the number of triangles to check (no duplicates).. worst case scenario it has duplicates and no hits....
inefficient.. slows down the entire game.
The SLDC chunk is a collision tree like that found in OBJ2's BSP data (
PCS2 uses the same code to generate the trees, just different code to pack them into their appropriate data lists). It should significantly improve performance in missions would many fighters.
All models saved with PCS2 that have a shield mesh will have an SLDC.