mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-02 08:40:01 +01:00
Adjust packet interpretation for nofall (prevent cheats slightly).
This commit is contained in:
parent
aae268baaf
commit
83804c7059
@ -190,13 +190,14 @@ public class NoFall extends Check {
|
|||||||
data.noFallOnGroundServer = player.world.getCubes(player, boundingBoxGround).size() > 0;
|
data.noFallOnGroundServer = player.world.getCubes(player, boundingBoxGround).size() > 0;
|
||||||
// make use of data.noFallY (absolute reference for falling height).
|
// make use of data.noFallY (absolute reference for falling height).
|
||||||
if (packet.hasPos){
|
if (packet.hasPos){
|
||||||
|
// TODO: not 100% sure which to use as reference...
|
||||||
if (data.noFallWasOnGroundServer && !data.noFallOnGroundServer){
|
if (data.noFallWasOnGroundServer && !data.noFallOnGroundServer){
|
||||||
data.noFallFallDistance = 0D;
|
data.noFallFallDistance = 0D;
|
||||||
data.noFallY = player.locY;
|
data.noFallY = player.locY;
|
||||||
}
|
}
|
||||||
else if (player.locY - packet.y > 0D)
|
else if (data.noFallY - packet.y > 0D)
|
||||||
data.noFallFallDistance = Math.max(0.0, data.noFallY - player.locY); //+= player.locY - packet.y;
|
data.noFallFallDistance = Math.max(0.0, data.noFallY - packet.y); //+= player.locY - packet.y;
|
||||||
else if (data.noFallY < player.locY) data.noFallY = player.locY;
|
else if (data.noFallOnGroundServer) data.noFallY = player.locY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user