return the player num, not the controller num
This commit is contained in:
1 parent
0e00f5fa7f
commit
cb7a063aa5
1 file changed
+2
-2
+2
-2
@@ -1519,8 +1519,8 @@ end
|
|||||||
-- Returns true if any player is pressing the given button (you can also specify any of the input functions)
|
-- Returns true if any player is pressing the given button (you can also specify any of the input functions)
|
||||||
function EID:PlayersActionPressed(button, inputFunc)
|
function EID:PlayersActionPressed(button, inputFunc)
|
||||||
inputFunc = inputFunc or Input.IsActionPressed
|
inputFunc = inputFunc or Input.IsActionPressed
|
||||||
for k,_ in pairs(EID.controllerIndexes) do
|
for k,v in pairs(EID.controllerIndexes) do
|
||||||
if inputFunc(button, k) then return true, k end
|
if inputFunc(button, k) then return true, v end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user