Fixed error if there are too many planets

Found by `Jammer`
This commit is contained in:
Ben C 2022-02-06 22:52:26 -05:00
parent ed034fa3f3
commit 28970e4138

View File

@ -72,7 +72,7 @@ namespace NewHorizons.Builder.General
MakeAllNodes(ref rootObject, transformParent, layer);
}
const int maxAmount = 20;
int maxAmount = Main.BodyDict[Main.Instance.CurrentStarSystem].Count;
ShipLogAstroObject[][] navMatrix = new ShipLogAstroObject[maxAmount][];
for (int i = 0; i < maxAmount; i++)
{