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

use equals instead of == #96

Closed JasonKDarby closed 2 years ago

JasonKDarby commented 6 years ago

I ran across the issue described in #67 and thought you might consider it more if I went ahead and put up a PR :D

AndrewHows commented 6 years ago

I believe this needs changing on line 149 as well.

And a +1 for this pull request - I was about to make the same request, so you saved me some time :)

niemandkun commented 5 years ago

Hi! I've just opened another pull request on that issue: https://github.com/libgdx/gdx-ai/pull/105

My solution is a little bit more general and maintains backward compatibility with older versions of the library, where identity check was used. Please, check it too.

tommyettinger commented 2 years ago

This is effectively possible now via a StopCondition added by #105 . There's a EqualsMethodStopCondition available by default now, which should act like this PR does. Thanks for waiting this out so long!