static void LinkBSPNodes(WMOGroup group)
{
foreach (var n in group.BSPNodes)
{
if (n.posChild != -1)
{
n.Positive = group.BSPNodes[n.posChild];
}
if (n.negChild != -1)
{
n.Negative = group.BSPNodes[n.negChild];
}
if (n.faceStart == 0 && n.nFaces == 0)
{
// empty?
continue;
}
//var faces = new ushort[n.nFaces];
n.TriIndices = new List<Index3>(n.nFaces);
for (var j = 0; j < n.nFaces; j++)
{
var triIndex = group.Indices[group.MOBR[n.faceStart + j]];
n.TriIndices.Add(triIndex);
}
}
//group.DumpBSPNodes();
}