diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..b522eb7 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Lua Interpreter", + "type": "lua-local", + "request": "launch", + "program": { + "lua": "lua", + "file": "${file}" + } + }, + { + "name": "Debug Custom Lua Environment", + "type": "lua-local", + "request": "launch", + "program": { + "command": "command" + }, + "args": [] + } + ] +} \ No newline at end of file diff --git a/balloon.lua b/balloon.lua index b4e28cc..a43241a 100644 --- a/balloon.lua +++ b/balloon.lua @@ -311,12 +311,12 @@ function ship.on_step(self, dtime, moveresult) end if pi then - if pi.ctrl.up then forward = 1 - elseif pi.ctrl.down then forward = -1 end - if pi.ctrl.jump then climb = 1 - elseif pi.ctrl.aux1 then climb = -1 end - if pi.ctrl.right then right = 1 - elseif pi.ctrl.left then right = -1 end + if pi.up then forward = 1 + elseif pi.down then forward = -1 end + if pi.jump then climb = 1 + elseif pi.aux1 then climb = -1 end + if pi.right then right = 1 + elseif pi.left then right = -1 end local yaw = self.object:get_yaw() local dir = minetest.yaw_to_dir(yaw)