bugfix: action checks without demo wouldnt be properly registered
This commit is contained in:
parent
a722c019f3
commit
405c80d039
|
@ -27,12 +27,17 @@ function Keybind:CheckDown(action)
|
|||
return false
|
||||
else
|
||||
for _, keyname in pairs(action.keys) do
|
||||
local fn = love.keyboard.isDown
|
||||
if not type(keyname) == "string" then
|
||||
local fn = love.mouse.isDown
|
||||
local check = false
|
||||
if type(keyname) == "string" then
|
||||
check = love.keyboard.isDown(keyname)
|
||||
else
|
||||
check = love.mouse.isDown(keyname)
|
||||
end
|
||||
if fn(keyname) then
|
||||
|
||||
if check then
|
||||
if action.demo ~= nil then
|
||||
Demo:RecordAction(action.demo)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue