mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-29 23:17:41 +02:00
enoughFrictionEnvelope: Compare with the absolute change of distance.
This commit is contained in:
parent
55715b0a9a
commit
6a4c75460a
@ -167,7 +167,7 @@ public class Magic {
|
|||||||
// TODO: Elaborate... could have one method to test them all?
|
// TODO: Elaborate... could have one method to test them all?
|
||||||
final double frictDist = lastMove.yDistance * friction - minGravity;
|
final double frictDist = lastMove.yDistance * friction - minGravity;
|
||||||
final double off = Math.abs(thisMove.yDistance - frictDist);
|
final double off = Math.abs(thisMove.yDistance - frictDist);
|
||||||
return off <= maxOff && thisMove.yDistance - lastMove.yDistance <= off * decreaseByOff;
|
return off <= maxOff && Math.abs(thisMove.yDistance - lastMove.yDistance) <= off * decreaseByOff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user