Fix for LODs glitch

This commit is contained in:
dexy 2019-12-11 17:15:02 +11:00
parent 93e5084ab9
commit 97c5294bf8

View File

@ -3553,6 +3553,8 @@ namespace CodeWalker.Rendering
if (ymap._CMapData.parent != 0) //ensure parent references on ymaps
{
ymaps.TryGetValue(ymap._CMapData.parent, out pymap);
if (pymap == null) //skip adding ymaps until parents are available
{ continue; }
if (ymap.Parent != pymap)
{
ymap.Parent = pymap;
@ -3617,6 +3619,8 @@ namespace CodeWalker.Rendering
var ymap = kvp.Value;
if (ymap.IsScripted && !ShowScriptedYmaps)
{ continue; }
if ((ymap._CMapData.parent != 0) && (ymap.Parent == null)) //skip adding ymaps until parents are available
{ continue; }
if (!CurrentYmaps.ContainsKey(kvp.Key))
{
CurrentYmaps.Add(kvp.Key, kvp.Value);