return the player num, not the controller num

This commit is contained in:
Buurazu authored and GitHub committed 2022-06-04 18:36:54 -04:00
1 parent 0e00f5fa7f
commit cb7a063aa5
1 file changed
+2 -2
+2 -2
View File
@@ -1519,8 +1519,8 @@ end
-- Returns true if any player is pressing the given button (you can also specify any of the input functions)
function EID:PlayersActionPressed(button, inputFunc)
inputFunc = inputFunc or Input.IsActionPressed
for k,_ in pairs(EID.controllerIndexes) do
if inputFunc(button, k) then return true, k end
for k,v in pairs(EID.controllerIndexes) do
if inputFunc(button, k) then return true, v end
end
return false
end