Hotfix for some DSL bugs (For node not working, Exploration not taking next layers into account)
This commit is contained in:
@@ -41,14 +41,13 @@ public class ExploreNode : ProgramNode
|
||||
private bool TrySelectTarget()
|
||||
{
|
||||
int safetyCounter = 0;
|
||||
int layerRange = Math.Max(GameData.lowestLayer, 1);
|
||||
int maximumAttempts = (int)Math.Pow(GameData.layerSize, 2) * 2;
|
||||
|
||||
while (safetyCounter <= maximumAttempts)
|
||||
{
|
||||
targetPosition = new Vector3I(
|
||||
GameData.rand.Next(GameData.layerSize),
|
||||
GameData.rand.Next(layerRange),
|
||||
GameData.rand.Next(GameData.lowestLayer + 1),
|
||||
GameData.rand.Next(GameData.layerSize)
|
||||
);
|
||||
if (!GameData.map[targetPosition.Y].tiles[targetPosition.X, targetPosition.Z].wasVisited)
|
||||
|
||||
Reference in New Issue
Block a user