Fixed LODs culling issue

This commit is contained in:
dexy
2019-12-11 22:38:59 +11:00
Unverified
parent 968a611aa9
commit 2b02ad0091
2 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -3651,7 +3651,7 @@ namespace CodeWalker.Rendering
foreach (var kvp in RootEntities)
{
var ent = kvp.Key;
if (EntityVisibleAtMaxLodLevel(ent) && EntityVisible(ent))
if (EntityVisibleAtMaxLodLevel(ent))
{
ent.Distance = MapViewEnabled ? MapViewDist : (ent.Position - Position).Length();
if (ent.Distance <= (ent.LodDist * LodDistMult))
@@ -3676,7 +3676,7 @@ namespace CodeWalker.Rendering
}
else
{
if ((ent.Parent == null) || EntityVisible(ent))
if (EntityVisible(ent))
{
VisibleLeaves.Add(ent);
}