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

Sequence is resetting the executingIndex to 0 when it should be resetting it to -1 #34

Closed
ykgamma opened this issue Jan 8, 2018 · 1 comment

Comments

@ykgamma
Copy link

ykgamma commented Jan 8, 2018

for net.citizensnpcs.api.ai.tree.Sequence, when selectNext is called, it increments the executingIndex before it gets the value.

Thus, when executingIndex is reset to 0 with reset(), ++executingIndex return 1, causing the sequence to always skip the first behaviour.

Changing the executingIndex to be set back to -1 like in the constructor would fix this issue.

@fullwall
Copy link
Member

fullwall commented Mar 9, 2018

Fixed, thanks

@fullwall fullwall closed this as completed Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants