Skip to content

Commit

Permalink
Fixing false positives
Browse files Browse the repository at this point in the history
- Finally fixing soulsand false positives on Speed (A).
- Fixing ladder false positive on NoFall (A) and (B)
- Fixing slime false positive on NoFall (A) and NoFall (B)
  • Loading branch information
funkemunky committed Apr 20, 2022
1 parent 2deff58 commit 83aadcf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@ public void onPacket(WrappedInFlyingPacket packet) {

if(onGround) {
flag = Math.abs(data.playerInfo.deltaY) > 0.0051
// Precautionary since it causes falses with onGround = false
&& data.playerInfo.slimeTimer.isPassed(2)
&& data.playerInfo.blockAboveTimer.isPassed(3)
&& (data.playerInfo.deltaY >= 0
// If player has touchdown, would be nasties
|| (data.playerInfo.deltaY <= data.playerInfo.lDeltaY));
} else {
flag = data.playerInfo.deltaY == 0 && data.playerInfo.lDeltaY == 0;
flag = data.playerInfo.deltaY == 0
&& data.playerInfo.lDeltaY == 0
// Player can move around in air but not be on the ground if sneaking
&& data.playerInfo.climbTimer.isPassed(3)
// For some reason causes false positives on slime blocks
&& data.playerInfo.slimeTimer.isPassed(2);
}

if(flag) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public void onFlying(WrappedInFlyingPacket packet, long timestamp) {
|| data.playerInfo.lastTeleportTimer.isNotPassed(3)
|| data.playerInfo.moveTicks < 2
|| data.playerInfo.canFly
|| data.playerInfo.slimeTimer.isNotPassed(3)
|| data.playerInfo.creative
|| data.playerInfo.climbTimer.isNotPassed(3)
|| !packet.isPos()
|| timestamp - data.creation < 2000L) {
//Subtracting buffers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ public void onFlying(WrappedInFlyingPacket packet) {
moveFactor*= 0.4;
}

if(data.blockInfo.onSoulSand) {
if(data.blockInfo.onSoulSand && data.playerInfo.lClientGround) {
tags.addTag("soulsand");
moveFactor*= 0.75;
moveFactor*= 0.88;
}

double ratio = (data.playerInfo.deltaXZ - ldxz) / moveFactor * 100;
Expand Down

0 comments on commit 83aadcf

Please sign in to comment.