cancel paths on exit
This commit is contained in:
parent
4c653e1d31
commit
dbca100e55
@ -56,7 +56,12 @@ public class PathingBehavior extends Behavior {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTick(TickEvent event) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
boolean safe = current.onTick(event);
|
boolean safe = current.onTick(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user