Skip to content

Commit

Permalink
Fix passable ray-tracing not stopping after collision.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Feb 28, 2013
1 parent 5ca6e33 commit 15a2165
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -89,6 +89,9 @@ protected boolean step(final int blockX, final int blockY, final int blockZ, fin
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)){
Expand All @@ -100,7 +103,7 @@ protected boolean step(final int blockX, final int blockY, final int blockZ, fin
// 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;
}

}

0 comments on commit 15a2165

Please sign in to comment.