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

Moved callback for async path finish to after the task is fully cleaned up #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OregonJunco
Copy link

@OregonJunco OregonJunco commented Jan 16, 2019

Hi there! Thanks so much for making this plugin -- it's been really great to work in!

In the current version of DoN, calling SchedulePathfindingTask from the Result Handler Delegate of an earlier SchedulePathfindingTask throws an error because the callback is invoked before the task is fully cleaned up.

An example use case would be an actor that's iteratively querying paths to different targets in order to choose the best one to take. DoN only allows one active pathfinding task at a time, so this actor will need to schedule new tasks immediately as the old ones finish.

This case is tested to work after swapping these two lines of code!

…ly cleaned up (i.e. owner removed from task owner list), fixing a bug where asking for a new path in the callback of an old path would cause an error.
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

Successfully merging this pull request may close these issues.

1 participant