mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-30 12:27:45 +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();
|
final boolean resetTo = toOnGround || to.isInLiquid() || to.isOnLadder()|| to.isInWeb();
|
||||||
|
|
||||||
// Accounting support.
|
// Accounting support.
|
||||||
if (cc.survivalFlyAccounting && !resetFrom) {
|
if (cc.survivalFlyAccounting && !resetFrom && !resetTo) {
|
||||||
// Horizontal.
|
// Horizontal.
|
||||||
if (data.horizontalFreedom <= 0.001D){
|
if (data.horizontalFreedom <= 0.001D){
|
||||||
// This only checks general speed decrease oncevelocity is smoked up.
|
// This only checks general speed decrease oncevelocity is smoked up.
|
||||||
hDistanceAboveLimit = Math.max(hDistanceAboveLimit, doAccounting(now, hDistance, data.hDistSum, data.hDistCount, tags, "hacc"));
|
hDistanceAboveLimit = Math.max(hDistanceAboveLimit, doAccounting(now, hDistance, data.hDistSum, data.hDistCount, tags, "hacc"));
|
||||||
}
|
}
|
||||||
// Vertical.
|
// Vertical.
|
||||||
if (data.verticalFreedom <= 0.001D && ! resetTo) {
|
if (data.verticalFreedom <= 0.001D) { // && ! resetTo) {
|
||||||
// Here yDistance can be negative and positive (!).
|
// Here yDistance can be negative and positive (!).
|
||||||
// TODO: Might demand resetting on some direction changes (bunny,)
|
// TODO: Might demand resetting on some direction changes (bunny,)
|
||||||
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, doAccounting(now, yDistance, data.vDistSum, data.vDistCount, tags, "vacc"));
|
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, doAccounting(now, yDistance, data.vDistSum, data.vDistCount, tags, "vacc"));
|
||||||
|
Loading…
Reference in New Issue
Block a user