Make QuadTree load renderSections from lowest detailLevel to highest

IE start with near sections and move out
This commit is contained in:
James Seibel
2023-03-04 11:49:25 -06:00
parent 6c9c6c9e99
commit d35befdf8e
@@ -513,7 +513,8 @@ public class LodQuadTree implements AutoCloseable
// if childCount == -1: // (section could be loaded or unloaded if the player is moving fast)
// - set this section to null (TODO: Is this needed to be first or last or don't matter for concurrency?)
// - If loaded unload section
for (byte sectLevel = (byte) (this.numbersOfSectionDetailLevels - 1); sectLevel >= TREE_LOWEST_DETAIL_LEVEL; sectLevel--)
// start with close sections and move outward
for (byte sectLevel = TREE_LOWEST_DETAIL_LEVEL; sectLevel < (byte) (this.numbersOfSectionDetailLevels - 1); sectLevel++)
{
final MovableGridRingList<LodRenderSection> ringList = this.renderSectionRingLists[sectLevel - TREE_LOWEST_DETAIL_LEVEL];
//final MovableGridRingList<LodRenderSection> childRingList = sectLevel == TREE_LOWEST_DETAIL_LEVEL ? null : this.renderSectionRingLists[sectLevel - TREE_LOWEST_DETAIL_LEVEL - 1];