From 4b3e58ceb3db44fdf809c8a86b613107a66c7021 Mon Sep 17 00:00:00 2001 From: jay Date: Wed, 7 Apr 2021 06:42:11 +0500 Subject: [PATCH] fix(mover): :bug: attempt to fix move while riding vehicle This never worked previously. Using one of `-1 0 1` instead of a larger number appears to work. --- lib/plugins/mover.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/mover.js b/lib/plugins/mover.js index 9ffdca5..899a527 100644 --- a/lib/plugins/mover.js +++ b/lib/plugins/mover.js @@ -166,7 +166,8 @@ function ride(entity) { function moveOrRide(turn = false, reverse = -1, directionLabel, message_parts2) { // bot.once("attach", state = "vehiccel") if (bot.vehicle) { - const amount = parseInt(message_parts2[0]) || 10 * -reverse + // FIXME moveVehicle should be +-1 or 0? + const amount = Math.sign(parseInt(message_parts2[0]) || -reverse) bot.moveVehicle(turn && amount || 0, !turn && amount || 0) } else { command([directionLabel].concat(message_parts2))