Skip to content

Commit

Permalink
Added second fly check and replace first one and improved collision c…
Browse files Browse the repository at this point in the history
…heck accuracy
  • Loading branch information
funkemunky committed Dec 28, 2018
1 parent 7be18e1 commit d829f9d
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 86 deletions.
111 changes: 56 additions & 55 deletions Daedalus/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Daedalus/out/artifacts/Daedalus_jar/Daedalus.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void assessBox(BoundingBox bb, World world) {

if (BlockUtils.isSolid(block)) {
if (bb.getMinimum().getY() < (playerBox.getMinimum().getY() + 0.1)) {
if(bb.collidesVertically(playerBox.subtract(0, 0.1f,0,0,0,0))) {
if(bb.collidesVertically(playerBox.subtract(0, 0.001f,0,0,0,0))) {
onGround = true;
fullyInAir = false;

Expand All @@ -48,7 +48,7 @@ public void assessBox(BoundingBox bb, World world) {
}
}

if ((bb.getMaximum().getY() + 0.1) > playerBox.getMaximum().getY() && bb.collidesVertically(playerBox.add(0, 0, 0, 0, 0.35f, 0))) {
if ((bb.getMaximum().getY() + 0.1) > playerBox.getMaximum().getY() && bb.collidesVertically(playerBox.add(0, 0, 0, 0, 0.5f, 0))) {
blocksOnTop = true;
}

Expand Down
Loading

0 comments on commit d829f9d

Please sign in to comment.