better comparison

This commit is contained in:
Leijurv 2019-06-30 21:55:32 -07:00
parent a8155b4b0b
commit 199e0e5ed3
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -92,7 +92,7 @@ public class PathingControlManager implements IPathingControlManager {
p.secretInternalSetGoal(null);
return;
}
if (inControlThisTick != inControlLastTick && command.commandType != PathingCommandType.REQUEST_PAUSE && inControlLastTick != null && !inControlLastTick.isTemporary()) {
if (!Objects.equals(inControlThisTick, inControlLastTick) && command.commandType != PathingCommandType.REQUEST_PAUSE && inControlLastTick != null && !inControlLastTick.isTemporary()) {
// if control has changed from a real process to another real process, and the new process wants to do something
p.cancelSegmentIfSafe();
// get rid of the in progress stuff from the last process