fix(mover): 🐛 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.
master
jay 3 years ago
parent 8e854a0a2f
commit 4b3e58ceb3
  1. 3
      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))

Loading…
Cancel
Save