mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-04 03:10:27 +02:00
Merge pull request #33 from Iceee/master
Further fix fight.direction check on players
This commit is contained in:
commit
4db6036a83
|
@ -146,6 +146,7 @@ public class Direction extends Check {
|
||||||
final Vector blockEyes = new Vector(dLoc.x - loc.getX(), dLoc.y + context.damagedHeight / 2D - loc.getY() - player.getEyeHeight(), dLoc.z - loc.getZ());
|
final Vector blockEyes = new Vector(dLoc.x - loc.getX(), dLoc.y + context.damagedHeight / 2D - loc.getY() - player.getEyeHeight(), dLoc.z - loc.getZ());
|
||||||
final double distance = blockEyes.crossProduct(context.direction).length() / context.lengthDirection;
|
final double distance = blockEyes.crossProduct(context.direction).length() / context.lengthDirection;
|
||||||
context.minViolation = Math.min(context.minViolation, distance);
|
context.minViolation = Math.min(context.minViolation, distance);
|
||||||
|
cancel = true;
|
||||||
}
|
}
|
||||||
context.minResult = Math.min(context.minResult, off);
|
context.minResult = Math.min(context.minResult, off);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user