From 15a2165a9c36ad389737fe44cf346f8062c87455 Mon Sep 17 00:00:00 2001 From: asofold Date: Thu, 28 Feb 2013 23:24:43 +0100 Subject: [PATCH] Fix passable ray-tracing not stopping after collision. --- .../nocheatplus/utilities/PassableRayTracing.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/PassableRayTracing.java b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/PassableRayTracing.java index 11ec5aec..f1b2b919 100644 --- a/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/PassableRayTracing.java +++ b/NCPCompat/src/main/java/fr/neatmonster/nocheatplus/utilities/PassableRayTracing.java @@ -89,6 +89,9 @@ public class PassableRayTracing extends RayTracing{ if (oZ >= bounds[5]) return true; else if (oZ + dZ * dT < bounds[2]) return true; } + + // TODO: Heuristic workaround for certain situations [might be better outside of this, probably a simplified version ofr the normal case]? + // Check for workarounds. // TODO: check f_itchy once exists. if (BlockProperties.isPassableWorkaround(blockCache, blockX, blockY, blockZ, oX, oY, oZ, id, dX, dY, dZ, dT)){ @@ -100,7 +103,7 @@ public class PassableRayTracing extends RayTracing{ // TODO: "Wrong" moves through edges of blocks (not sure, needs reproducing). // (Could allow start-end if passable + check first collision time or some estimate.) collides = true; - return true; + return false; } }