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.
This commit is contained in:
		| @@ -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)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user