Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return node is only executed if its explicitly connected #646

Closed
Naros opened this issue Aug 3, 2024 · 0 comments · Fixed by #649
Closed

Return node is only executed if its explicitly connected #646

Naros opened this issue Aug 3, 2024 · 0 comments · Fixed by #649
Labels
bug/confirmed Bug/regression has been confirmed. cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 kind/bug A bug or regression in expected behavior.
Milestone

Comments

@Naros
Copy link
Member

Naros commented Aug 3, 2024

Describe the bug

Given the following graph:

image

The VM will execute the F 00 node and the Branch node, immediately exiting the function call. This results in the function's return value being set to null rather than 3. If the False output pin from the Branch node were connected to the Return Node, then the output would have been 3 as well.

Expected behavior

Any top-level (non-nested) control flow pin should implicitly be connected to the Return Node if one exists and has return values. This guarantees that the graph's execution works like that of a text-based program, i.e.:

func f00:
  if false:
    for x in range(1, 10):
      # do loop stuff
  return 3

Actual behavior

The Return Node only fires when the control flow exits the first for-loop's completed pin.

How to Reproduce?

No response

Godot full version

No response

Orchestrator version

2.1.rc3

Additional information

No response

@Naros Naros added kind/bug A bug or regression in expected behavior. bug/confirmed Bug/regression has been confirmed. cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 labels Aug 3, 2024
@Naros Naros added this to the 2.1 milestone Aug 3, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Aug 3, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Aug 3, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Aug 3, 2024
Naros added a commit that referenced this issue Aug 3, 2024
@Naros Naros closed this as completed in #649 Aug 3, 2024
Naros added a commit that referenced this issue Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed Bug/regression has been confirmed. cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 kind/bug A bug or regression in expected behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant