diff --git a/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs b/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs index 6749651..72fa115 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs @@ -625,23 +625,6 @@ namespace CodeWalker.GameFiles } } - public void GetVisibleChildren(ref Vector3 p, List 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() { return Name.ToString() + ", " + diff --git a/CodeWalker.Core/World/Space.cs b/CodeWalker.Core/World/Space.cs index b9c7f4d..77f5b08 100644 --- a/CodeWalker.Core/World/Space.cs +++ b/CodeWalker.Core/World/Space.cs @@ -327,29 +327,7 @@ namespace CodeWalker.World MapDataStore = new SpaceMapDataStore(); - List rootnodes = new List(); - List lodnodes = new List(); - List orphnodes = new List(); - - foreach (var node in nodedict.Values) - { - if (node.ParentName == 0) - { - rootnodes.Add(node); - if (((node.ContentFlags & 2) > 0) || ((node.ContentFlags & 4) > 0) || ((node.ContentFlags & 16) > 0)) - { - lodnodes.Add(node); - } - else - { - orphnodes.Add(node); - } - } - } - - - MapDataStore.Init(rootnodes); - + MapDataStore.Init(nodedict.Values.ToList()); } @@ -1706,7 +1684,6 @@ namespace CodeWalker.World if ((p.X >= imin.X) && (p.X <= imax.X) && (p.Y >= imin.Y) && (p.Y <= imax.Y)) { items.Add(item); - item.GetVisibleChildren(ref p, items); } } }