mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 20:20:11 +01:00
Add comments ,set noFallY more often.
This commit is contained in:
parent
b8102f2f6d
commit
6a7f14077c
@ -56,16 +56,27 @@ public class NoFall extends Check {
|
|||||||
// Emergency fix attempt:
|
// Emergency fix attempt:
|
||||||
data.clearFlyData();
|
data.clearFlyData();
|
||||||
player.setFallDistance(0.0f);
|
player.setFallDistance(0.0f);
|
||||||
|
data.noFallY = to.getY();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the player has just started falling, is falling into a liquid, in web or is on a ladder.
|
// If the player has just started falling, is falling into a liquid, in web or is on a ladder.
|
||||||
if (to.isInLiquid() || to.isInWeb() || to.isOnLadder())
|
if (to.isInLiquid() || to.isInWeb() || to.isOnLadder()){
|
||||||
// Reset his fall distance.
|
// Reset his fall distance.
|
||||||
data.noFallFallDistance = 0D;
|
data.noFallFallDistance = 0D;
|
||||||
|
data.noFallY = to.getY();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// data.noFallFallDistance = data.noFallFallDistance;
|
// data.noFallFallDistance = data.noFallFallDistance;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: This might actually (probably) calculated before ordinary fall damage can be dealt (!)
|
||||||
|
* So NoCheatPlus takes over ALL fall damage dealing, currently :) -
|
||||||
|
* This should not lead to alerts and trigger normal fall damage, probably,
|
||||||
|
* in case it is not cheating (how to distinguish...).
|
||||||
|
*/
|
||||||
|
|
||||||
// If the player just touched the ground for the server, but no for the client.
|
// If the player just touched the ground for the server, but no for the client.
|
||||||
if (!data.noFallWasOnGroundServer && data.noFallOnGroundServer
|
if (!data.noFallWasOnGroundServer && data.noFallOnGroundServer
|
||||||
&& (data.noFallWasOnGroundClient || !data.noFallOnGroundClient)) {
|
&& (data.noFallWasOnGroundClient || !data.noFallOnGroundClient)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user