mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-26 17:02:53 +08:00
Fix for crash caused by bad entity LOD linkage
This commit is contained in:
parent
7ec9b10e32
commit
73402373e3
@ -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) || d.LodInParentYmap)
|
if ((pind < 0) || (pind >= alldefs.Count) || d.LodInParentYmap)
|
||||||
{
|
{
|
||||||
isroot = true;
|
isroot = true;
|
||||||
}
|
}
|
||||||
@ -912,7 +912,7 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
//pind = 0;
|
//pind = 0;
|
||||||
}
|
}
|
||||||
if ((pind >= 0) && (pind < AllEntities.Length) && rcent.LodInParentYmap)
|
if ((pind >= 0) && (pind < AllEntities.Length) && !rcent.LodInParentYmap)
|
||||||
{
|
{
|
||||||
var pentity = AllEntities[pind];
|
var pentity = AllEntities[pind];
|
||||||
pentity.AddChild(rcent);
|
pentity.AddChild(rcent);
|
||||||
|
Loading…
Reference in New Issue
Block a user