mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 16:04:49 +08:00
LOD manager performance improvements
This commit is contained in:
@@ -1321,6 +1321,8 @@ namespace CodeWalker.GameFiles
|
||||
|
||||
public uint EntityHash { get; set; } = 0; //used by CW as a unique position+name identifier
|
||||
|
||||
public LinkedList<YmapEntityDef> LodManagerChildren = null;
|
||||
|
||||
|
||||
public string Name
|
||||
{
|
||||
@@ -1695,6 +1697,21 @@ namespace CodeWalker.GameFiles
|
||||
ChildList = null;
|
||||
}
|
||||
|
||||
|
||||
public void LodManagerAddChild(YmapEntityDef child)
|
||||
{
|
||||
if (LodManagerChildren == null)
|
||||
{
|
||||
LodManagerChildren = new LinkedList<YmapEntityDef>();
|
||||
}
|
||||
LodManagerChildren.AddLast(child);
|
||||
}
|
||||
public void LodManagerRemoveChild(YmapEntityDef child)
|
||||
{
|
||||
LodManagerChildren?.Remove(child);//could improve this by caching the list node....
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return _CEntityDef.ToString() + ((ChildList != null) ? (" (" + ChildList.Count.ToString() + " children) ") : " ") + _CEntityDef.lodLevel.ToString();
|
||||
|
||||
Reference in New Issue
Block a user