Compare commits
2 Commits
ef4124c2df
...
604d437272
Author | SHA1 | Date | |
---|---|---|---|
604d437272 | |||
38c74502f7 |
@ -29,7 +29,7 @@ Vec3.prototype.xzNorm = function xzNorm() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Vec3.prototype.dotXZ = function dotXZ(other) {
|
Vec3.prototype.dotXZ = function dotXZ(other) {
|
||||||
return (this.x * other.x) + (this.y * other.y);
|
return (this.x * other.x) + (this.z * other.z);
|
||||||
};
|
};
|
||||||
|
|
||||||
Vec3.prototype.crossXZ = function crossXZ(other) {
|
Vec3.prototype.crossXZ = function crossXZ(other) {
|
||||||
|
@ -288,6 +288,7 @@ export default function inject(bot) {
|
|||||||
if (tactic == null) { tactic = {}; }
|
if (tactic == null) { tactic = {}; }
|
||||||
if (tactic.sprint == null) { tactic.sprint = dis > 3; }
|
if (tactic.sprint == null) { tactic.sprint = dis > 3; }
|
||||||
if (tactic.speed == null) { tactic.speed = tactic.sprint ? .355 : .216; }
|
if (tactic.speed == null) { tactic.speed = tactic.sprint ? .355 : .216; }
|
||||||
|
const axis = AXIS[axis_raw];
|
||||||
assert.ok(typeof axis == 'number');
|
assert.ok(typeof axis == 'number');
|
||||||
assert.ok(0 <= axis && axis <= 3);
|
assert.ok(0 <= axis && axis <= 3);
|
||||||
assert.ok(typeof dis == 'number');
|
assert.ok(typeof dis == 'number');
|
||||||
@ -297,7 +298,6 @@ export default function inject(bot) {
|
|||||||
throw new NotOnGroundError();
|
throw new NotOnGroundError();
|
||||||
}
|
}
|
||||||
|
|
||||||
const axis = AXIS[axis_raw];
|
|
||||||
bot.control.centralizeXZ();
|
bot.control.centralizeXZ();
|
||||||
let target = bot.entity.position.plus(AXIS_UNIT[axis].scaled(dis));
|
let target = bot.entity.position.plus(AXIS_UNIT[axis].scaled(dis));
|
||||||
logger(`jumpForward() axis: ${"zx"[axis % 2]}`);
|
logger(`jumpForward() axis: ${"zx"[axis % 2]}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user