|
|
@ -166,7 +166,8 @@ function ride(entity) { |
|
|
|
function moveOrRide(turn = false, reverse = -1, directionLabel, message_parts2) { |
|
|
|
function moveOrRide(turn = false, reverse = -1, directionLabel, message_parts2) { |
|
|
|
// bot.once("attach", state = "vehiccel")
|
|
|
|
// bot.once("attach", state = "vehiccel")
|
|
|
|
if (bot.vehicle) { |
|
|
|
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) |
|
|
|
bot.moveVehicle(turn && amount || 0, !turn && amount || 0) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
command([directionLabel].concat(message_parts2)) |
|
|
|
command([directionLabel].concat(message_parts2)) |
|
|
|