mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-29 19:01:22 +01:00
Also check steps done with the split move.
This commit is contained in:
parent
2d24049db9
commit
7286df5875
@ -193,11 +193,11 @@ public class Passable extends Check {
|
|||||||
// Always check y first.
|
// Always check y first.
|
||||||
rayTracing.set(from.getX(), from.getY(), from.getZ(), from.getX(), to.getY(), from.getZ());
|
rayTracing.set(from.getX(), from.getY(), from.getZ(), from.getX(), to.getY(), from.getZ());
|
||||||
rayTracing.loop();
|
rayTracing.loop();
|
||||||
if (!rayTracing.collides()) {
|
if (!rayTracing.collides() && rayTracing.getStepsDone() < rayTracing.getMaxSteps()) {
|
||||||
// horizontal second.
|
// horizontal second.
|
||||||
rayTracing.set(from.getX(), to.getY(), from.getZ(), to.getX(), to.getY(), to.getZ());
|
rayTracing.set(from.getX(), to.getY(), from.getZ(), to.getX(), to.getY(), to.getZ());
|
||||||
rayTracing.loop();
|
rayTracing.loop();
|
||||||
if (!rayTracing.collides()) {
|
if (!rayTracing.collides() && rayTracing.getStepsDone() < rayTracing.getMaxSteps()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,11 +211,11 @@ public class Passable extends Check {
|
|||||||
// }
|
// }
|
||||||
// rayTracing.set(from.getX(), from.getY(), from.getZ(), to.getX(), from.getY(), to.getZ());
|
// rayTracing.set(from.getX(), from.getY(), from.getZ(), to.getX(), from.getY(), to.getZ());
|
||||||
// rayTracing.loop();
|
// rayTracing.loop();
|
||||||
// if (!rayTracing.collides()) {
|
// if (!rayTracing.collides() && rayTracing.getStepsDone() < rayTracing.getMaxSteps()) {
|
||||||
// // y second.
|
// // y second.
|
||||||
// rayTracing.set(to.getX(), from.getY(), to.getZ(), to.getX(), to.getY(), to.getZ());
|
// rayTracing.set(to.getX(), from.getY(), to.getZ(), to.getX(), to.getY(), to.getZ());
|
||||||
// rayTracing.loop();
|
// rayTracing.loop();
|
||||||
// if (!rayTracing.collides()) {
|
// if (!rayTracing.collides() && rayTracing.getStepsDone() < rayTracing.getMaxSteps()) {
|
||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
Loading…
Reference in New Issue
Block a user