fix verifiedMaxJump
- remove redundant assignment by changing some values - testing Co-Authors Co-Authored-By: Leijurv <leijurv@gmail.com>
This commit is contained in:
parent
7a7b050615
commit
335cb7016e
@ -106,9 +106,8 @@ public class MovementParkour extends Movement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check parkour jumps from smallest to largest for obstacles/walls and landing positions
|
// 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++) {
|
for (int i = 2; i <= maxJump; i++) {
|
||||||
verifiedMaxJump = i - 1;
|
|
||||||
int destX = x + xDiff * i;
|
int destX = x + xDiff * i;
|
||||||
int destZ = z + zDiff * i;
|
int destZ = z + zDiff * i;
|
||||||
|
|
||||||
@ -151,8 +150,7 @@ public class MovementParkour extends Movement {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset verifiedMaxJump so that if we exit out of the for loop here it is not changed
|
verifiedMaxJump = i;
|
||||||
verifiedMaxJump = maxJump;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// parkour place starts here
|
// parkour place starts here
|
||||||
|
Loading…
x
Reference in New Issue
Block a user