cancel paths on exit

This commit is contained in:
Leijurv 2018-08-13 13:13:42 -07:00
parent 4c653e1d31
commit dbca100e55
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 6 additions and 1 deletions

View File

@ -56,7 +56,12 @@ public class PathingBehavior extends Behavior {
@Override
public void onTick(TickEvent event) {
if (event.getType() == TickEvent.Type.OUT || current == null) {
if (event.getType() == TickEvent.Type.OUT) {
current = null;
next = null;
return;
}
if (current == null) {
return;
}
boolean safe = current.onTick(event);