mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-03 19:00:30 +02:00
Confine lost-ground check for block edges further.
This commit is contained in:
parent
212438dd7b
commit
9ba173b82e
|
@ -103,6 +103,7 @@ public class SurvivalFly extends Check {
|
||||||
|
|
||||||
// "Lost ground" workaround.
|
// "Lost ground" workaround.
|
||||||
if (fromOnGround || from.isResetCond()) resetFrom = true;
|
if (fromOnGround || from.isResetCond()) resetFrom = true;
|
||||||
|
// TODO: Extra workarounds for toOnGround ?
|
||||||
else if (lostGround(player, from, to, hDistance, yDistance, sprinting, data, cc)){
|
else if (lostGround(player, from, to, hDistance, yDistance, sprinting, data, cc)){
|
||||||
// TODO: Consider && !resetTo ?
|
// TODO: Consider && !resetTo ?
|
||||||
// TODO: Confine by max y distance and min xz-distance?
|
// TODO: Confine by max y distance and min xz-distance?
|
||||||
|
@ -538,8 +539,8 @@ public class SurvivalFly extends Check {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Lost ground while falling onto/over edges of blocks.
|
// Lost ground while falling onto/over edges of blocks.
|
||||||
if (yDistance < 0 && yDistance >= -0.5 && hDistance <= 0.5 && data.sfLastYDist < 0 && yDistance > data.sfLastYDist){
|
if (yDistance < 0 && yDistance >= -0.5 && hDistance <= 0.5 && data.sfLastYDist < 0 && yDistance > data.sfLastYDist && !to.isOnGround()){
|
||||||
// TODO: yDistance >= -0.15 might be possible.
|
// TODO: Should this be an extra lost-ground(to) check, setting toOnGround [for no-fall no difference]?
|
||||||
// TODO: yDistance <= 0 might be better.
|
// TODO: yDistance <= 0 might be better.
|
||||||
// Also clear accounting data.
|
// Also clear accounting data.
|
||||||
if (to.isOnGround(0.5) || from.isOnGround(0.5)){
|
if (to.isOnGround(0.5) || from.isOnGround(0.5)){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user