mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-14 03:21:24 +01:00
[BLEEDING] SF: Sharpen vertical accounting (vacc). Read details!
Potential false positives are survivalfly violations with vacc[...]. * Touch down near ground (lost-ground miss). * Slow falling after login/teleports.
This commit is contained in:
parent
65ee38bf9a
commit
a7344eb462
@ -604,6 +604,7 @@ public class SurvivalFly extends Check {
|
|||||||
*
|
*
|
||||||
* @param now
|
* @param now
|
||||||
* @param yDistance
|
* @param yDistance
|
||||||
|
* @param jumpPhase Counter for events in-air.
|
||||||
* @param sum
|
* @param sum
|
||||||
* @param count
|
* @param count
|
||||||
* @param tags
|
* @param tags
|
||||||
@ -639,7 +640,7 @@ public class SurvivalFly extends Check {
|
|||||||
tags.add(tag + "grace");
|
tags.add(tag + "grace");
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
tags.add(tag);
|
tags.add(tag); // Specific tags?
|
||||||
if (diff < 0.0 ){
|
if (diff < 0.0 ){
|
||||||
// Note: aDiff should be <= 0.07 here.
|
// Note: aDiff should be <= 0.07 here.
|
||||||
// TODO: Does this high violation make sense?
|
// TODO: Does this high violation make sense?
|
||||||
@ -649,6 +650,15 @@ public class SurvivalFly extends Check {
|
|||||||
return diff;
|
return diff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Check for too small change of speed.
|
||||||
|
if (aDiff < 0.065){ // Minimum amount to be gained.
|
||||||
|
// TODO: Conditions are fast mock-up, aiming at glide hacks mostly.
|
||||||
|
// TODO: Potential fp: "slow falling" during chunk load/render, missing lost ground.
|
||||||
|
tags.add(tag); // + descend?
|
||||||
|
return 0.07 - diff;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// TODO: return Float.MAX_VALUE if no violation ?
|
// TODO: return Float.MAX_VALUE if no violation ?
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user