fix verifiedMaxJump

- remove redundant assignment by changing some values
- testing Co-Authors

Co-Authored-By: Leijurv <leijurv@gmail.com>
This commit is contained in:
Harry 2021-07-17 13:28:12 +10:00
parent 7a7b050615
commit 335cb7016e

View File

@ -106,9 +106,8 @@ public class MovementParkour extends Movement {
}
// check parkour jumps from smallest to largest for obstacles/walls and landing positions
int verifiedMaxJump = -1;
int verifiedMaxJump = 1; // i - 1 (when i = 2)
for (int i = 2; i <= maxJump; i++) {
verifiedMaxJump = i - 1;
int destX = x + xDiff * i;
int destZ = z + zDiff * i;
@ -151,8 +150,7 @@ public class MovementParkour extends Movement {
break;
}
// reset verifiedMaxJump so that if we exit out of the for loop here it is not changed
verifiedMaxJump = maxJump;
verifiedMaxJump = i;
}
// parkour place starts here