mirror of
https://codeberg.org/SumianVoice/sum_airship.git
synced 2025-03-15 12:21:23 +00:00
fix obvious crash
This commit is contained in:
parent
d48df74c47
commit
0d0c25f2c4
2 changed files with 32 additions and 6 deletions
26
.vscode/launch.json
vendored
Normal file
26
.vscode/launch.json
vendored
Normal file
|
@ -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": []
|
||||
}
|
||||
]
|
||||
}
|
12
balloon.lua
12
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue