Compare commits

..

No commits in common. "604d437272bb068ca8470edc0af2ad698196f133" and "ef4124c2df9ef043e4f31e7dd027aa9366ed5dde" have entirely different histories.

2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ Vec3.prototype.xzNorm = function xzNorm() {
};
Vec3.prototype.dotXZ = function dotXZ(other) {
return (this.x * other.x) + (this.z * other.z);
return (this.x * other.x) + (this.y * other.y);
};
Vec3.prototype.crossXZ = function crossXZ(other) {

View File

@ -288,7 +288,6 @@ export default function inject(bot) {
if (tactic == null) { tactic = {}; }
if (tactic.sprint == null) { tactic.sprint = dis > 3; }
if (tactic.speed == null) { tactic.speed = tactic.sprint ? .355 : .216; }
const axis = AXIS[axis_raw];
assert.ok(typeof axis == 'number');
assert.ok(0 <= axis && axis <= 3);
assert.ok(typeof dis == 'number');
@ -298,6 +297,7 @@ export default function inject(bot) {
throw new NotOnGroundError();
}
const axis = AXIS[axis_raw];
bot.control.centralizeXZ();
let target = bot.entity.position.plus(AXIS_UNIT[axis].scaled(dis));
logger(`jumpForward() axis: ${"zx"[axis % 2]}`);