Replaced world grid with quadtrees, improved loading speed of cutscenes

This commit is contained in:
dexy
2019-12-05 21:05:31 +11:00
Unverified
parent d59663d87e
commit a5259c17fe
10 changed files with 887 additions and 926 deletions
@@ -625,6 +625,22 @@ namespace CodeWalker.GameFiles
}
}
public void GetVisibleChildren(ref Vector3 p, List<MapDataStoreNode> items)
{
if (Children == null) return;
for (int i = 0; i < Children.Length; i++)
{
var c = Children[i];
if (c == null) continue;
var cmin = c.streamingExtentsMin;
var cmax = c.streamingExtentsMax;
if ((p.X >= cmin.X) && (p.X <= cmax.X) && (p.Y >= cmin.Y) && (p.Y <= cmax.Y))
{
items.Add(c);
c.GetVisibleChildren(ref p, items);
}
}
}
public override string ToString()
{