mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-02-19 05:01:50 +01:00
Add in-air VL freeze. Regain hbuf if not frozen
This commit is contained in:
parent
b68265dd56
commit
79e3cc9046
@ -509,14 +509,16 @@ public class SurvivalFly extends Check {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Slowly reduce the level with each event, if violations have not recently happened.
|
// Slowly reduce the level with each event, if violations have not recently happened.
|
||||||
if (now - data.sfVLTime > cc.survivalFlyVLFreeze) {
|
// TODO: Switch to move count instead of time (!).
|
||||||
|
if (now - data.sfVLTime > cc.survivalFlyVLFreeze
|
||||||
|
&& (!cc.survivalFlyVLFreezeInAir || !Magic.inAir(thisMove))) {
|
||||||
|
// Relax VL.
|
||||||
data.survivalFlyVL *= 0.95D;
|
data.survivalFlyVL *= 0.95D;
|
||||||
}
|
// Finally check horizontal buffer regain.
|
||||||
|
if (hDistanceAboveLimit < 0.0 && result <= 0.0 && !isSamePos && data.sfHorizontalBuffer < cc.hBufMax) {
|
||||||
// Finally check horizontal buffer regain.
|
// TODO: max min other conditions ?
|
||||||
if (hDistanceAboveLimit < 0.0 && result <= 0.0 && !isSamePos && data.sfHorizontalBuffer < cc.hBufMax) {
|
hBufRegain(hDistance, Math.min(0.2, Math.abs(hDistanceAboveLimit)), data, cc);
|
||||||
// TODO: max min other conditions ?
|
}
|
||||||
hBufRegain(hDistance, Math.min(0.2, Math.abs(hDistanceAboveLimit)), data, cc);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user