fix(cheats): no-clip's double-tap is opt-in, and mods can show on-screen notices #3201
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3201
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/flight-double-tap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Players found No-clip flight switching itself on while they played. Enable cheats alone armed a hidden double-tap of B (the Steam Deck's bottom A button), even with the No-clip flight row Off, so closing a text box could set Link flying. A tester hit the same thing on #3044.
On
main: turn Debug > Cheats > Enable cheats on, close the menu and press B twice quickly.This PR:
notify(text, { key, seconds })inlongshot/uiandModApi::notifyin Rust (ui.hud; 3 a mod, 5 in all, 1 to 10 s, 200 characters, three lines; gone when the mod stops).Read first:
host/nn_hid.c(flight_jump_shortcut),game/crates/api/src/services/notices.rs,game/mods/cheats/src/system_mod.rs, the docs.Testing
Tested: Linux (CachyOS, kernel 7.3.3), RTX 3090, NVIDIA 620.70.06, in a window from the
kokiri-startsave, played by hand on a build from before the review fixes below:hid: double-tap of Jump: no-clip flight onand 2off);Checks:
tests/test_flight_shortcut.pyfails onmainand passes here.mod testcase callsnotify()from a script (drawn, replaced by its key, gone); unit tests cover the bounds.mod checknot knowingnotify, docs) are fixed. Those fixes were not played.mod testsuite and Python checks this change reaches (dev.py test-changed's list), and a Linux build. Failures that also fail onmain:build-driver'sthe_repository_s_lock_and_the_table_agreeandmodtool'sthe_mods_tab_passes_its_tests(both run onmaintoo). Failures in files this change does not touch, not re-run onmain:longshot-builder'sone_copy,tests/test_no_game_title.py(it namestests/test_lower_cs2r_depbar.py), andtest_device_policy.py/test_target_reuse_memory.py(no Vulkan headers on this PC).modtool'sthe_menu_passes_its_testspassed in the first run with this change's menu row, then failed its per-frame CPU limit twice (a search frame 3.59 ms against 2.77 ms); not run onmain.-A clippy::large_const_arrays:host-sys's generated settings table fails that lint, unchanged frommain.Still to test:
Measurements
Verdict: the accidental take-off is gone; no frame time was measured.
Setup: the game-free test above; the in-game run in Testing. The change adds a settings lookup to the controller read and an emptiness check each frame while no notice shows.
a66fa5fc13c8871ftests/test_flight_shortcut.pyRisks
Anyone who used the double-tap has to turn Double-tap to fly on, once each start, and press X, not B. No saved setting changes. The notice API is new public mod API. A revert is enough.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Not run whole yet: only the tests this change reaches.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.mainand here, for a change that shows on screen. None taken.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Linux (CachyOS 7.3.3), RTX 3090, NVIDIA 620.70.06, played by hand from kokiri-start on a build before the last review fixes: no take-off with only Enable cheats on; with Double-tap to fly on, double-tap X took off and landed; the notice showed; no take-off during NPC dialogue.
Possibly related, for context:
WIP: fix(cheats): no-clip's double-tap is opt-in, and mods can show on-screen noticesto fix(cheats): no-clip's double-tap is opt-in, and mods can show on-screen notices