FIX - block all phone input groups

Disable control groups 0, 1, and 2 while the phone cursor owns focus so movement, combat, camera, and mapped actions such as hands-up cannot leak through. Update the focus contract test to verify every group.
This commit is contained in:
Leon.Schmidt
2026-08-16 18:17:12 +02:00
parent 7d0f5a50f4
commit fbb304c23c
2 changed files with 10 additions and 6 deletions
+6 -5
View File
@@ -1,5 +1,5 @@
local disabled_controls = {}
local all_controls_disabled = false
local all_controls_disabled = {}
local firing_disabled = false
function DisableControlAction(group, control, disabled)
@@ -8,8 +8,7 @@ function DisableControlAction(group, control, disabled)
end
function DisableAllControlActions(group)
assert(group == 0, "focused phone input must block the primary input group")
all_controls_disabled = true
all_controls_disabled[group] = true
end
function PlayerId()
@@ -91,10 +90,12 @@ assert(
)
SkyPhoneFocus.ApplyFocusedControls()
assert(all_controls_disabled, "focused phone cursor must block every GTA control while typing")
for _, group in ipairs({ 0, 1, 2 }) do
assert(all_controls_disabled[group], ("focused phone cursor must block input group %d while typing"):format(group))
end
assert(firing_disabled, "focused phone cursor must block attacks while typing")
all_controls_disabled = false
all_controls_disabled = {}
firing_disabled = false
SkyPhoneFocus.ApplyGameInputControls(true)
for _, control in ipairs({ 19, 24, 140, 141, 142, 257, 263, 264 }) do