libgdx / gdx-ai

Artificial Intelligence framework for games based on libGDX or not. Features: Steering Behaviors, Formation Motion, Pathfinding, Behavior Trees and Finite State Machines
Apache License 2.0
1.18k stars 241 forks source link

Fix include task guard copy issue #116

Closed jhoukem closed 2 years ago

jhoukem commented 2 years ago

There was an issue when using a non-lazy IncludeTask where its guard task will not be cloned/copied whereas it would be if the task was lazy:

(needToResetToSpawn?) include subtree:"data/aiBehavioursTree/spawn_reset.btree" // Here the guard will simply be omitted in the final tree  
(needToResetToSpawn?) include subtree:"data/aiBehavioursTree/spawn_reset.btree" lazy:true // Here the guard will be included in the final tree
tommyettinger commented 2 years ago

Looks good, from what I can tell. I fixed the Gradle version conflict because that was my fault; I think I can just merge this now.