wfowler1 / LibBSP

C# library for parsing and reading BSP (Binary Space Partition) structures in Quake-based game engines
Other
93 stars 26 forks source link

Node children use incorrect index for leaves #7

Closed Panzerhandschuh closed 1 year ago

Panzerhandschuh commented 1 year ago

The leaf index for the Child1/2 properties in Node.cs is incorrect. The index should be -(ChildIndex + 1) instead of just -ChildIndex. https://developer.valvesoftware.com/wiki/Source_BSP_File_Format#Node_and_leaf