Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Dec 12, 2024
1 parent 293d8b9 commit 36454a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/plugins/physics.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,27 +102,27 @@ function inject (bot, { physicsEnabled, maxCatchupTicks }) {
sideways: bot.controlState.left ? -1 : bot.controlState.right ? 1 : 0,
jump: bot.controlState.jump ? 1 : 0
}
for (let key of Object.keys(bot.vehicleMove)) {
for (const key of Object.keys(bot.vehicleMove)) {
bot.vehicleMove[key] = Math.min(Math.abs(bot.vehicleMove[key]), 0.9800000190734863) * Math.sign(bot.vehicleMove[key])
}
bot._client.write('steer_vehicle', {
sideways: bot.vehicleMove.sideways,
forward: bot.vehicleMove.forward,
jump: bot.vehicleMove.jump,
jump: bot.vehicleMove.jump
})
const inBoat = bot.vehicle?.name === 'boat'
if (inBoat) {
bot._client.write('steer_boat', {
leftPaddle: bot.controlState.left || bot.controlState.forward || bot.controlState.back,
rightPaddle: bot.controlState.right || bot.controlState.forward || bot.controlState.back,
rightPaddle: bot.controlState.right || bot.controlState.forward || bot.controlState.back
})
}
bot._client.write('vehicle_move', {
x: bot.vehicle.position.x,
y: bot.vehicle.position.y,
z: bot.vehicle.position.z,
yaw: bot.vehicle.yaw,
pitch: bot.vehicle.pitch,
pitch: bot.vehicle.pitch
})
bot.vehicleMove = {
sideways: 0,
Expand Down

0 comments on commit 36454a8

Please sign in to comment.