mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-30 20:37:52 +01:00
SF: Use accounting only in air.
This commit is contained in:
parent
3bb18c5c35
commit
50ad3915ed
@ -320,14 +320,14 @@ public class SurvivalFly extends Check {
|
||||
final boolean resetTo = toOnGround || to.isInLiquid() || to.isOnLadder()|| to.isInWeb();
|
||||
|
||||
// Accounting support.
|
||||
if (cc.survivalFlyAccounting && !resetFrom) {
|
||||
if (cc.survivalFlyAccounting && !resetFrom && !resetTo) {
|
||||
// Horizontal.
|
||||
if (data.horizontalFreedom <= 0.001D){
|
||||
// This only checks general speed decrease oncevelocity is smoked up.
|
||||
hDistanceAboveLimit = Math.max(hDistanceAboveLimit, doAccounting(now, hDistance, data.hDistSum, data.hDistCount, tags, "hacc"));
|
||||
}
|
||||
// Vertical.
|
||||
if (data.verticalFreedom <= 0.001D && ! resetTo) {
|
||||
if (data.verticalFreedom <= 0.001D) { // && ! resetTo) {
|
||||
// Here yDistance can be negative and positive (!).
|
||||
// TODO: Might demand resetting on some direction changes (bunny,)
|
||||
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, doAccounting(now, yDistance, data.vDistSum, data.vDistCount, tags, "vacc"));
|
||||
|
Loading…
Reference in New Issue
Block a user