mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-10 07:57:53 +08:00
Use LodInParentYmap flag for LOD linking instead of index check hack
This commit is contained in:
parent
64f007d611
commit
d622cd33fa
@ -315,7 +315,7 @@ namespace CodeWalker.GameFiles
|
|||||||
YmapEntityDef d = alldefs[i];
|
YmapEntityDef d = alldefs[i];
|
||||||
int pind = d._CEntityDef.parentIndex;
|
int pind = d._CEntityDef.parentIndex;
|
||||||
bool isroot = false;
|
bool isroot = false;
|
||||||
if ((pind < 0) || (pind >= alldefs.Count) || (pind >= i)) //index check? might be a problem
|
if ((pind < 0) || d.LodInParentYmap)
|
||||||
{
|
{
|
||||||
isroot = true;
|
isroot = true;
|
||||||
}
|
}
|
||||||
@ -912,7 +912,7 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
//pind = 0;
|
//pind = 0;
|
||||||
}
|
}
|
||||||
if ((pind >= 0) && (pind < AllEntities.Length))
|
if ((pind >= 0) && (pind < AllEntities.Length) && rcent.LodInParentYmap)
|
||||||
{
|
{
|
||||||
var pentity = AllEntities[pind];
|
var pentity = AllEntities[pind];
|
||||||
pentity.AddChild(rcent);
|
pentity.AddChild(rcent);
|
||||||
@ -1718,6 +1718,8 @@ namespace CodeWalker.GameFiles
|
|||||||
public LightInstance[] Lights { get; set; }
|
public LightInstance[] Lights { get; set; }
|
||||||
//public uint[] LightHashTest { get; set; }
|
//public uint[] LightHashTest { get; set; }
|
||||||
|
|
||||||
|
public bool LodInParentYmap { get { return ((_CEntityDef.flags >> 3) & 1) > 0; } }
|
||||||
|
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user