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
|
return false
|
||||||
else
|
else
|
||||||
for _, keyname in pairs(action.keys) do
|
for _, keyname in pairs(action.keys) do
|
||||||
local fn = love.keyboard.isDown
|
local check = false
|
||||||
if not type(keyname) == "string" then
|
if type(keyname) == "string" then
|
||||||
local fn = love.mouse.isDown
|
check = love.keyboard.isDown(keyname)
|
||||||
|
else
|
||||||
|
check = love.mouse.isDown(keyname)
|
||||||
end
|
end
|
||||||
if fn(keyname) then
|
|
||||||
|
if check then
|
||||||
|
if action.demo ~= nil then
|
||||||
Demo:RecordAction(action.demo)
|
Demo:RecordAction(action.demo)
|
||||||
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue