mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-09 23:28:03 +08:00
Fixed some items not being loaded into world map data store
This commit is contained in:
parent
a5259c17fe
commit
faf530c04c
@ -625,23 +625,6 @@ 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()
|
||||
{
|
||||
return Name.ToString() + ", " +
|
||||
|
@ -327,29 +327,7 @@ namespace CodeWalker.World
|
||||
|
||||
MapDataStore = new SpaceMapDataStore();
|
||||
|
||||
List<MapDataStoreNode> rootnodes = new List<MapDataStoreNode>();
|
||||
List<MapDataStoreNode> lodnodes = new List<MapDataStoreNode>();
|
||||
List<MapDataStoreNode> orphnodes = new List<MapDataStoreNode>();
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user