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

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);