Hotfix for some DSL bugs (For node not working, Exploration not taking next layers into account)
This commit is contained in:
@@ -14,12 +14,12 @@ public class ForNode : ProgramNode
|
||||
public override NodeResult Execute(Robot robot, double delta)
|
||||
{
|
||||
bool isConditionFulfilled = DetermineCondition();
|
||||
amountExecuted++;
|
||||
if (isConditionFulfilled)
|
||||
{
|
||||
amountExecuted = 0;
|
||||
}
|
||||
return isConditionFulfilled ? NodeResult.SUCCESS : NodeResult.CONDITIONFALSE;
|
||||
amountExecuted++;
|
||||
return isConditionFulfilled ? NodeResult.CONDITIONFALSE : NodeResult.SUCCESS;
|
||||
}
|
||||
|
||||
private bool DetermineCondition()
|
||||
|
||||
Reference in New Issue
Block a user