mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-07-01 08:44:43 +02:00
Ensure resetting hacc only happens with head obstructed.
This commit is contained in:
parent
518f2f08da
commit
bea35e610a
|
@ -1541,8 +1541,8 @@ public class SurvivalFly extends Check {
|
||||||
// Allow hop for special cases.
|
// Allow hop for special cases.
|
||||||
if (!allowHop && (thisMove.from.onGround || thisMove.touchedGroundWorkaround)) {
|
if (!allowHop && (thisMove.from.onGround || thisMove.touchedGroundWorkaround)) {
|
||||||
// TODO: Better reset delay in this case ?
|
// TODO: Better reset delay in this case ?
|
||||||
if (data.bunnyhopDelay <= 6 || yDistance >= 0.0 && thisMove.headObstructed) { // || to.isHeadObstructed()) {
|
if (data.bunnyhopDelay <= 6) {
|
||||||
// TODO: headObstructed: check always and set a flag in data + consider regain buffer?
|
// TODO: Confine further ?
|
||||||
tags.add("ediblebunny");
|
tags.add("ediblebunny");
|
||||||
allowHop = true;
|
allowHop = true;
|
||||||
}
|
}
|
||||||
|
@ -1551,19 +1551,20 @@ public class SurvivalFly extends Check {
|
||||||
&& lastMove.hDistance > lastMove.hAllowedDistanceBase && lastMove.hDistance < 1.34 * lastMove.hAllowedDistanceBase
|
&& lastMove.hDistance > lastMove.hAllowedDistanceBase && lastMove.hDistance < 1.34 * lastMove.hAllowedDistanceBase
|
||||||
&& thisMove.hDistance > lastMove.hDistance * 1.24
|
&& thisMove.hDistance > lastMove.hDistance * 1.24
|
||||||
&& thisMove.hDistance < lastMove.hDistance * 1.34
|
&& thisMove.hDistance < lastMove.hDistance * 1.34
|
||||||
|
|| yDistance >= 0.0 && thisMove.headObstructed // || to.isHeadObstructed()
|
||||||
) {
|
) {
|
||||||
|
// TODO: headObstructed: check always and set a flag in data + consider regain buffer?
|
||||||
tags.add("headbangbunny");
|
tags.add("headbangbunny");
|
||||||
allowHop = true;
|
allowHop = true;
|
||||||
}
|
|
||||||
// ONLY WITH ALL ABOVE BEING ABOUT HEAD OBSTRUCTED:
|
|
||||||
// TODO: Magic.
|
// TODO: Magic.
|
||||||
if (allowHop && data.combinedMediumHValue / (double) data.combinedMediumHCount < 1.5) {
|
if (data.combinedMediumHValue / (double) data.combinedMediumHCount < 1.5) {
|
||||||
// TODO: Reset to 1 and min(allowed, actual) rather.
|
// TODO: Reset to 1 and min(allowed, actual) rather.
|
||||||
data.combinedMediumHCount = 0;
|
data.combinedMediumHCount = 0;
|
||||||
data.combinedMediumHValue = 0.0;
|
data.combinedMediumHValue = 0.0;
|
||||||
tags.add("bunny_no_hacc");
|
tags.add("bunny_no_hacc");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user