fix(fps): Link pulls himself up a ledge above 60 fps as at 60 #1740

Merged
HumanBean merged 2 commits from CraftyCorvid/Longshot:fix/ledge-climb-above-60 into main 2026-11-19 15:06:15 +00:00
Contributor

Type: fix · Risk: low · Tested on: Linux, RTX 5090 · Needs: none

TL;DR

Above a 60 FPS cap, Link's pull-up onto a ledge fell short: he slid back on the lip until he got over, and letting go of
forward dropped him back to the hang. The game drives his body toward a target each update, and above 60 Havok delivers
only part of each move (86% at 120 FPS, 78% at 170) while the next target starts from where the body ended up. Now Link's
driven body is given last update's target plus this frame's move, so it follows the animation's path. At 60 to 170 FPS he
now rises 2.80 m every time with no slips; a new test fails on main and passes here.

Breakdown

  • Who it helps: anyone climbing ledges with the frame rate cap above 60 (reported in the Forest Temple at 120 and up;
    any ledge Link jumps up to and pulls himself onto).
  • What was wrong: the pull-up's target is built each update from where Link's body is plus the animation's move; above
    60 the physics delivers less than the move, and the shortfall is never made up.
  • What changes: above a 60 cap, on a frame shorter than a 60 FPS one, Link's driven body's target carries last update's
    shortfall (at most three moves), so the body reaches where the animation puts it.
  • What does not change: a cap of 60 (the body lands on its target there; nothing is carried), frames of a 60 FPS one or
    longer, every other body, Havok itself, saves and options.
  • How it was checked: a game-free test (the body short by 13-38% from 120 to 240 FPS on main, within 0.5% here), and
    scripted climbs in the game at 60, 90, 120, 144 and uncapped, before and after.
  • What is still open: Windows in the game; Link's other driven moves (ladders, vines) were not climbed.
  • Risk: low: only Link's body while it is driven to a target, above a 60 cap, changes.

Why

With the Game frame rate cap at 120 or above, Link slips back while pulling himself up a ledge; releasing forward drops him
back to hanging. Fixes #1494.

The root cause is in Havok's constraint solve, which is tuned so a driven body lands on its target in a 60 FPS frame. The
trace into Havok and the options weighed (a Havok fix, physics at 60 Hz, holding 60 during the climb) are on the issue:
#1494 (comment). Fixing it in Havok would change every
constraint and contact in the game above 60; this change compensates for Link's driven body only.

How to reproduce

Seen on: CachyOS Linux (kernel 7.3), RTX 5090, NVIDIA 620.70.06
Settings and switches: Game frame rate cap 120, 144 or Uncapped, everything else default
Steps: as adult Link in the Forest Temple's main hall, walk into the wooden ledge by the red stairs (Link jumps up,
hangs, then pulls himself up); let go of forward while he is pulling himself up
Expected: he finishes the pull-up as at a cap of 60
Actual: he rises less, slides back on the lip, and drops back to the hang when forward is let go

What changed

Each update of a pull-up, f_804f5030 (a rigid body's update before the physics step, on its path for a body driven to a
target: the controller's flags have 0x80, the game's gate to the path, and 0x100, its gate to handing the velocity to the
world) reads the controller's target (+0x3c), which the game set to the body's position plus this
frame's move from the animation, and asks the physics for (target - position) x 1/dt. At 60 FPS the body lands exactly on
the target. Above 60 the physics delivers only part of the move (1.00 at 60, 0.94 at 90, 0.86 at 120, 0.82 at 144, 0.78 at
170), and the next target starts from where the body ended up. Before the target is read, the host now adds last update's
shortfall (last target minus where the body is now) for Link's body, at most three of this frame's moves (enough down to a
quarter share, about 400 FPS, while a body something held back is not flung when it frees).

  • A carry needs the same body and its last driven call in this update or the one before. Link's updates are counted in
    hos_oot_lift_player, and the path is not reached between two climbs, so each climb starts from the game's own target.
    The count only finds gaps: a wrong count drops a carry, it never holds a target back.

  • A target bit for bit the game's last (the body update run again before the physics) or the last one given (not renewed)
    gets the last target given, so nothing is carried twice.

  • lift: nx2/oot_patches.py patch_drive_target: both copies of the driven path in f_804f5030 (the body loaded into
    x23 or x24) call hos_oot_drive_target between the body's load and the target's reads; report warns when fewer than two
    are found.

  • host: host/oot_high_fps.h oot_drive_carry (the rule, and why at the top of the file); host/oot_high_fps.c
    hos_oot_note_link (counts Link's updates; his rigid body from his components, each pointer checked to be in guest
    memory) and hos_oot_drive_target (reads the frame's step as the
    barge's fix does; HOS_FPS_LOG logs the carry); host/hos_main.c hos_oot_lift_player calls hos_oot_note_link.

  • test: tests/test_drive_target.py.

  • docs: the README's frame rate cap row.

How it was found (local diagnostic builds, not in this PR, driven through the control bridge from a save at the ledge):

  • Per-update traces showed the jump to the hang identical at 60 and uncapped, then the pull-up's target always the body
    plus the animation's move, and the body reaching it fully at 60 and partly above.
  • A synchronous trace of the body update, the physics' sync and the position copy put the shortfall in the physics step,
    and hooks inside Havok's integration (f_8182dc20, TtSubIntegrateLast) and constraint solve (f_8177b2a0) showed the
    driven velocity ramped through the substeps, landing exactly at 60 and short above it, whatever the substep count.
  • Many bodies take this path (flags 0x180); only Link's is changed.

Measurements

Verdict: fixed. At 90, 120, 144 and uncapped (147-179 FPS) Link's pull-up rises 2.78-2.80 m (2.81 at 60) with no slips,
and letting go of forward partway up leaves him at the top of the pull-up, as at 60; on main above 120 it rose 2.38-2.55
m with 1-5 slips and letting go dropped him to the hang every time. The game-free test fails on main for this bug and
passes here.

Hardware: CachyOS Linux (kernel 7.3), RTX 5090, NVIDIA 620.70.06
Scene: the Forest Temple's main hall, a save at the wooden ledge by the red stairs; Game frame rate cap 60, 90, 120, 144
and Uncapped
Method: tests/test_drive_target.py (gcc and clang); in the game, a script that walks Link back below the ledge, sets the
cap through the control bridge and climbs holding forward, recording Link's position at every update (peak height over
the floor, slides back on the lip of more than 3 cm, time from the jump to 1 m past the edge); a second script lets go of
forward once Link is 1.4 m up and reads where he is 3 s later
How to reproduce: python -I -B tests/test_drive_target.py; in the game, the steps above
Baseline: the in-game before is main 4b68c42b with #1528 (the barge's fix, merged since) built as a dev pack over a base
of 71b1edd8; the after is this branch's final code on 47430e81, built the same way. Nothing between those touches the files
this PR changes or the pull-up. The branch is now rebased onto 868f6be8 (it changed host/hos_main.c elsewhere and the
README); the test fails at its commit and passes at the fix there too.

Before: main @ 868f6be8 (with the test, 77c29ac9) After: this PR @ 46e752a7
test_drive_target.py fails: the body rises 1.678 m of 1.920 at 120 FPS, 1.581 at 144, 1.476 at 170, 1.194 at 240 passes (25 checks); the unpatched update fails the 120 FPS check
Pull-up, holding forward (peak / slips / to 1 m past) 60: 2.81 m / 0 / 1.8-2.0 s; 90: 2.74 / 0 / 2.2-2.3; 120: 2.55 / 3-4 / 2.6-2.9; 144 and uncapped: 2.38-2.51 / 1-5 / 2.6-3.2 60: 2.81 / 0 / 2.0; 90, 120 and 144: 2.80 / 0 / 2.2-2.3; uncapped (147-179 FPS): 2.78-2.80 / 0 / 2.0-2.2
Letting go of forward 1.4 m up (uncapped, 4 climbs) back at the hang (+0.89 m) 4 of 4 at the top of the pull-up (+2.80 m) 4 of 4, as at 60 on both
Before, test (77c29ac9 on main 868f6be8):
FAIL: 120 fps: the body rose 1.678 m of the lift's 1.920 and moved in 0.0699 m of 0.0800
FAIL: 144 fps: the body rose 1.581 m of the lift's 1.920 and moved in 0.0659 m of 0.0800
FAIL: 170 fps: the body rose 1.476 m of the lift's 1.920 and moved in 0.0615 m of 0.0800
FAIL: 240 fps: the body rose 1.194 m of the lift's 1.920 and moved in 0.0498 m of 0.0800
FAIL: Link's driven body's target above 60 fps (the patch is missing)

After, test (46e752a7):
PASS: Link's driven body's target (25 checks)
PASS: the unpatched update compiles and fails the 120 fps check (the body rose 1.678 m of the lift's 1.920 and moved in 0.0699 m of 0.0800)
PASS: Link's update gives his body and counts his updates, every update (host/hos_main.c)
PASS: scoped, idempotent, and a changed anchor is left alone with a warning

After, in the game (HOS_FPS_LOG=1, caps 144 and uncapped):
oot: Link's driven body: its target carried 0.0391 m more than the game's (step 0.434)
oot: Link's driven body: its target carried 0.0226 m more than the game's (step 0.350)

Flags and settings

None (HOS_FPS_LOG, the existing diagnostic switch, gets one more line).

Testing

Tested:

  • In the game, Linux, RTX 5090, NVIDIA 620.70.06, this branch's final code built as a dev pack over a base of 71b1edd8 (no
    warning from the lift: both copies found). Scripted climbs of the Forest Temple ledge: 2 at 60, 2 at 90, 3 at 120, 3 at
    144, 3 uncapped (147-179 FPS), and the let-go climbs (4 uncapped, 2 at 60) on this branch and on main, with the numbers
    above.
  • tests/test_drive_target.py with gcc and clang: fails at 77c29ac9 (the test alone, on main), passes at 46e752a7.
    Broken on purpose it fails, each for its own check (20 mutations): no carry; no cap (a held-back body given 12.6 moves);
    no guard for a non-finite target or body position; any body; without the cap-above-60 test (a cap of 60 with slowed
    time); without the step under 1; any flags, or 0x80 alone; no body check (Link's body changed); no gap check, or a gap of
    5 allowed; a not-driven call keeping the carry alive; carrying height only; no rule for a target run again in the same
    update, or for one not renewed; repeats decided by the update count (Link's update not run before 10 body updates: 1.30 m
    of 1.92); no update count; hos_oot_note_link not called, or called under a condition.
  • A second agent reviewed the branch cold, twice (read only). Its first pass found the carry not dropped between climbs (the
    path is gated on 0x80, so not reached when Link is not driven) and a target not renewed being carried again; its second
    found that deciding repeats by the update count could hold Link's target back if his update ever did not run first. All
    three are fixed as described above, with checks for each, and its suggested mutations are among the 20.
  • python -I -B tests/run_all.py (Linux, on 868f6be8): 710 passed, 36 failed, 106 skipped (Vulkan and SPIR-V headers missing
    here). One is test_vbytes, which hit the 600 s limit under the full run's load (the lifter's vector byte helpers, timed;
    it reads none of the files this PR changes). The other 35 also fail on main 868f6be8 (run there): test_bug_report_defaults,
    test_capture_read_once, test_crt_options, test_damage_debug_menu, test_dev_packs, test_discover,
    test_display_startup_failure, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported,
    test_high_fps_fixes, test_host_guest_writes, test_hud_layout_row, test_libc_hooks, test_lift_lookups, test_linux_preflight,
    test_linux_pressure, test_linux_update, test_log_open_failure, test_mise_build, test_missing_nup, test_mods_size_table,
    test_pending_guest_import, test_pipeline_play_cache, test_prepare_cache_save, test_present_thread, test_profiling_mode,
    test_psychov35_fsr3_fg, test_readback_timeout_source, test_slow_frames, test_song_note_cue, test_upscaler_rows,
    test_vcore_escape, test_walk, test_walk_key.
  • host/oot_high_fps.c and host/hos_main.c compiled alone (-fsyntax-only -Wall -Wextra, the build's include folders)
    with gcc for Linux and llvm-mingw clang for Windows: the same warnings as on main (none in oot_high_fps.c).

Not tested:

  • Windows in the game (no platform-specific code; the host files compile with llvm-mingw).
  • Link's other moves that may be driven the same way (ladders, vines, climbing onto blocks, dropping to a hang) and other
    ledges; child Link.
  • What the test doesn't model: the game's threads (the body update runs on the physics' workers; the carry is under a lock
    and keyed by the body), Link's update and the body update swapping order between frames (a wrong count only drops a
    carry), the real physics (a stand-in delivering the measured share), contacts that stop the body.

Must be tested: None.

Risks

What could break: how Link's body follows a driven move above a 60 FPS cap, on frames under a 60 FPS one. If
something holds his body back during such a move, the target given is at most three frames' moves past the game's, for
one update after it frees. Every other body, a cap of 60, and frames of a 60 FPS one or longer are as before.

Turning it off: revert the commit, or a cap of 60.

Compatibility: Nothing changes for saves, options or caches; an update translates the game's code again, as for any
change to the lift's patches.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened. (None needed: the checks that
    read host/oot_high_fps.*, host/hos_main.c or nx2/oot_patches.py pass, or fail the same way on main.)
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.

🤖 Generated with Claude Code

**Type:** fix · **Risk:** low · **Tested on:** Linux, RTX 5090 · **Needs:** none ## TL;DR Above a 60 FPS cap, Link's pull-up onto a ledge fell short: he slid back on the lip until he got over, and letting go of forward dropped him back to the hang. The game drives his body toward a target each update, and above 60 Havok delivers only part of each move (86% at 120 FPS, 78% at 170) while the next target starts from where the body ended up. Now Link's driven body is given last update's target plus this frame's move, so it follows the animation's path. At 60 to 170 FPS he now rises 2.80 m every time with no slips; a new test fails on main and passes here. ## Breakdown - **Who it helps:** anyone climbing ledges with the frame rate cap above 60 (reported in the Forest Temple at 120 and up; any ledge Link jumps up to and pulls himself onto). - **What was wrong:** the pull-up's target is built each update from where Link's body is plus the animation's move; above 60 the physics delivers less than the move, and the shortfall is never made up. - **What changes:** above a 60 cap, on a frame shorter than a 60 FPS one, Link's driven body's target carries last update's shortfall (at most three moves), so the body reaches where the animation puts it. - **What does not change:** a cap of 60 (the body lands on its target there; nothing is carried), frames of a 60 FPS one or longer, every other body, Havok itself, saves and options. - **How it was checked:** a game-free test (the body short by 13-38% from 120 to 240 FPS on main, within 0.5% here), and scripted climbs in the game at 60, 90, 120, 144 and uncapped, before and after. - **What is still open:** Windows in the game; Link's other driven moves (ladders, vines) were not climbed. - **Risk:** low: only Link's body while it is driven to a target, above a 60 cap, changes. ## Why With the Game frame rate cap at 120 or above, Link slips back while pulling himself up a ledge; releasing forward drops him back to hanging. Fixes https://git.magicbean.dev/MagicBeanDev/Longshot/issues/1494. The root cause is in Havok's constraint solve, which is tuned so a driven body lands on its target in a 60 FPS frame. The trace into Havok and the options weighed (a Havok fix, physics at 60 Hz, holding 60 during the climb) are on the issue: https://git.magicbean.dev/MagicBeanDev/Longshot/issues/1494#issuecomment-54114. Fixing it in Havok would change every constraint and contact in the game above 60; this change compensates for Link's driven body only. ## How to reproduce **Seen on:** CachyOS Linux (kernel 7.3), RTX 5090, NVIDIA 620.70.06 **Settings and switches:** Game frame rate cap 120, 144 or Uncapped, everything else default **Steps:** as adult Link in the Forest Temple's main hall, walk into the wooden ledge by the red stairs (Link jumps up, hangs, then pulls himself up); let go of forward while he is pulling himself up **Expected:** he finishes the pull-up as at a cap of 60 **Actual:** he rises less, slides back on the lip, and drops back to the hang when forward is let go ## What changed Each update of a pull-up, `f_804f5030` (a rigid body's update before the physics step, on its path for a body driven to a target: the controller's flags have 0x80, the game's gate to the path, and 0x100, its gate to handing the velocity to the world) reads the controller's target (+0x3c), which the game set to the body's position plus this frame's move from the animation, and asks the physics for (target - position) x 1/dt. At 60 FPS the body lands exactly on the target. Above 60 the physics delivers only part of the move (1.00 at 60, 0.94 at 90, 0.86 at 120, 0.82 at 144, 0.78 at 170), and the next target starts from where the body ended up. Before the target is read, the host now adds last update's shortfall (last target minus where the body is now) for Link's body, at most three of this frame's moves (enough down to a quarter share, about 400 FPS, while a body something held back is not flung when it frees). - A carry needs the same body and its last driven call in this update or the one before. Link's updates are counted in `hos_oot_lift_player`, and the path is not reached between two climbs, so each climb starts from the game's own target. The count only finds gaps: a wrong count drops a carry, it never holds a target back. - A target bit for bit the game's last (the body update run again before the physics) or the last one given (not renewed) gets the last target given, so nothing is carried twice. - lift: `nx2/oot_patches.py` `patch_drive_target`: both copies of the driven path in `f_804f5030` (the body loaded into x23 or x24) call `hos_oot_drive_target` between the body's load and the target's reads; `report` warns when fewer than two are found. - host: `host/oot_high_fps.h` `oot_drive_carry` (the rule, and why at the top of the file); `host/oot_high_fps.c` `hos_oot_note_link` (counts Link's updates; his rigid body from his components, each pointer checked to be in guest memory) and `hos_oot_drive_target` (reads the frame's step as the barge's fix does; `HOS_FPS_LOG` logs the carry); `host/hos_main.c` `hos_oot_lift_player` calls `hos_oot_note_link`. - test: `tests/test_drive_target.py`. - docs: the README's frame rate cap row. How it was found (local diagnostic builds, not in this PR, driven through the control bridge from a save at the ledge): - Per-update traces showed the jump to the hang identical at 60 and uncapped, then the pull-up's target always the body plus the animation's move, and the body reaching it fully at 60 and partly above. - A synchronous trace of the body update, the physics' sync and the position copy put the shortfall in the physics step, and hooks inside Havok's integration (`f_8182dc20`, `TtSubIntegrateLast`) and constraint solve (`f_8177b2a0`) showed the driven velocity ramped through the substeps, landing exactly at 60 and short above it, whatever the substep count. - Many bodies take this path (flags 0x180); only Link's is changed. ## Measurements **Verdict:** fixed. At 90, 120, 144 and uncapped (147-179 FPS) Link's pull-up rises 2.78-2.80 m (2.81 at 60) with no slips, and letting go of forward partway up leaves him at the top of the pull-up, as at 60; on `main` above 120 it rose 2.38-2.55 m with 1-5 slips and letting go dropped him to the hang every time. The game-free test fails on `main` for this bug and passes here. Hardware: CachyOS Linux (kernel 7.3), RTX 5090, NVIDIA 620.70.06 Scene: the Forest Temple's main hall, a save at the wooden ledge by the red stairs; Game frame rate cap 60, 90, 120, 144 and Uncapped Method: `tests/test_drive_target.py` (gcc and clang); in the game, a script that walks Link back below the ledge, sets the cap through the control bridge and climbs holding forward, recording Link's position at every update (peak height over the floor, slides back on the lip of more than 3 cm, time from the jump to 1 m past the edge); a second script lets go of forward once Link is 1.4 m up and reads where he is 3 s later How to reproduce: `python -I -B tests/test_drive_target.py`; in the game, the steps above Baseline: the in-game before is `main` 4b68c42b with #1528 (the barge's fix, merged since) built as a dev pack over a base of 71b1edd8; the after is this branch's final code on 47430e81, built the same way. Nothing between those touches the files this PR changes or the pull-up. The branch is now rebased onto 868f6be8 (it changed `host/hos_main.c` elsewhere and the README); the test fails at its commit and passes at the fix there too. | | Before: main @ 868f6be8 (with the test, 77c29ac9) | After: this PR @ 46e752a7 | |---|---|---| | `test_drive_target.py` | fails: the body rises 1.678 m of 1.920 at 120 FPS, 1.581 at 144, 1.476 at 170, 1.194 at 240 | passes (25 checks); the unpatched update fails the 120 FPS check | | Pull-up, holding forward (peak / slips / to 1 m past) | 60: 2.81 m / 0 / 1.8-2.0 s; 90: 2.74 / 0 / 2.2-2.3; 120: 2.55 / 3-4 / 2.6-2.9; 144 and uncapped: 2.38-2.51 / 1-5 / 2.6-3.2 | 60: 2.81 / 0 / 2.0; 90, 120 and 144: 2.80 / 0 / 2.2-2.3; uncapped (147-179 FPS): 2.78-2.80 / 0 / 2.0-2.2 | | Letting go of forward 1.4 m up (uncapped, 4 climbs) | back at the hang (+0.89 m) 4 of 4 | at the top of the pull-up (+2.80 m) 4 of 4, as at 60 on both | ``` Before, test (77c29ac9 on main 868f6be8): FAIL: 120 fps: the body rose 1.678 m of the lift's 1.920 and moved in 0.0699 m of 0.0800 FAIL: 144 fps: the body rose 1.581 m of the lift's 1.920 and moved in 0.0659 m of 0.0800 FAIL: 170 fps: the body rose 1.476 m of the lift's 1.920 and moved in 0.0615 m of 0.0800 FAIL: 240 fps: the body rose 1.194 m of the lift's 1.920 and moved in 0.0498 m of 0.0800 FAIL: Link's driven body's target above 60 fps (the patch is missing) After, test (46e752a7): PASS: Link's driven body's target (25 checks) PASS: the unpatched update compiles and fails the 120 fps check (the body rose 1.678 m of the lift's 1.920 and moved in 0.0699 m of 0.0800) PASS: Link's update gives his body and counts his updates, every update (host/hos_main.c) PASS: scoped, idempotent, and a changed anchor is left alone with a warning After, in the game (HOS_FPS_LOG=1, caps 144 and uncapped): oot: Link's driven body: its target carried 0.0391 m more than the game's (step 0.434) oot: Link's driven body: its target carried 0.0226 m more than the game's (step 0.350) ``` ### Flags and settings None (`HOS_FPS_LOG`, the existing diagnostic switch, gets one more line). ## Testing **Tested:** - In the game, Linux, RTX 5090, NVIDIA 620.70.06, this branch's final code built as a dev pack over a base of 71b1edd8 (no warning from the lift: both copies found). Scripted climbs of the Forest Temple ledge: 2 at 60, 2 at 90, 3 at 120, 3 at 144, 3 uncapped (147-179 FPS), and the let-go climbs (4 uncapped, 2 at 60) on this branch and on `main`, with the numbers above. - `tests/test_drive_target.py` with gcc and clang: fails at 77c29ac9 (the test alone, on `main`), passes at 46e752a7. Broken on purpose it fails, each for its own check (20 mutations): no carry; no cap (a held-back body given 12.6 moves); no guard for a non-finite target or body position; any body; without the cap-above-60 test (a cap of 60 with slowed time); without the step under 1; any flags, or 0x80 alone; no body check (Link's body changed); no gap check, or a gap of 5 allowed; a not-driven call keeping the carry alive; carrying height only; no rule for a target run again in the same update, or for one not renewed; repeats decided by the update count (Link's update not run before 10 body updates: 1.30 m of 1.92); no update count; `hos_oot_note_link` not called, or called under a condition. - A second agent reviewed the branch cold, twice (read only). Its first pass found the carry not dropped between climbs (the path is gated on 0x80, so not reached when Link is not driven) and a target not renewed being carried again; its second found that deciding repeats by the update count could hold Link's target back if his update ever did not run first. All three are fixed as described above, with checks for each, and its suggested mutations are among the 20. - `python -I -B tests/run_all.py` (Linux, on 868f6be8): 710 passed, 36 failed, 106 skipped (Vulkan and SPIR-V headers missing here). One is `test_vbytes`, which hit the 600 s limit under the full run's load (the lifter's vector byte helpers, timed; it reads none of the files this PR changes). The other 35 also fail on `main` 868f6be8 (run there): test_bug_report_defaults, test_capture_read_once, test_crt_options, test_damage_debug_menu, test_dev_packs, test_discover, test_display_startup_failure, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported, test_high_fps_fixes, test_host_guest_writes, test_hud_layout_row, test_libc_hooks, test_lift_lookups, test_linux_preflight, test_linux_pressure, test_linux_update, test_log_open_failure, test_mise_build, test_missing_nup, test_mods_size_table, test_pending_guest_import, test_pipeline_play_cache, test_prepare_cache_save, test_present_thread, test_profiling_mode, test_psychov35_fsr3_fg, test_readback_timeout_source, test_slow_frames, test_song_note_cue, test_upscaler_rows, test_vcore_escape, test_walk, test_walk_key. - `host/oot_high_fps.c` and `host/hos_main.c` compiled alone (`-fsyntax-only -Wall -Wextra`, the build's include folders) with gcc for Linux and llvm-mingw clang for Windows: the same warnings as on `main` (none in `oot_high_fps.c`). **Not tested:** - Windows in the game (no platform-specific code; the host files compile with llvm-mingw). - Link's other moves that may be driven the same way (ladders, vines, climbing onto blocks, dropping to a hang) and other ledges; child Link. - What the test doesn't model: the game's threads (the body update runs on the physics' workers; the carry is under a lock and keyed by the body), Link's update and the body update swapping order between frames (a wrong count only drops a carry), the real physics (a stand-in delivering the measured share), contacts that stop the body. **Must be tested:** None. ## Risks **What could break:** how Link's body follows a driven move above a 60 FPS cap, on frames under a 60 FPS one. If something holds his body back during such a move, the target given is at most three frames' moves past the game's, for one update after it frees. Every other body, a cap of 60, and frames of a 60 FPS one or longer are as before. **Turning it off:** revert the commit, or a cap of 60. **Compatibility:** Nothing changes for saves, options or caches; an update translates the game's code again, as for any change to the lift's patches. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. (None needed: the checks that read `host/oot_high_fps.*`, `host/hos_main.c` or `nx2/oot_patches.py` pass, or fail the same way on `main`.) - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
While Link pulls himself up a ledge his animation drives his body: each update f_804f5030 sets the
target to the body's position plus this frame's move and asks the physics for (target - position)
/ dt. Above 60 fps Havok's solve delivers only part of the move, and the next target starts from
where the body ended up, so the pull-up falls short. The check runs an authored f_804f5030 (both
copies of its driven path) through patch_file with the host's part cut from host/oot_high_fps.c,
and a stand-in physics delivering the share measured in the game; on main the body rises 1.68 m of
a 1.92 m lift at 120 fps.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(fps): Link pulls himself up a ledge above 60 fps as at 60
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
e4ea06ea4a
While Link pulls himself up a ledge his animation drives his body: each update f_804f5030 sets the
controller's target to the body's position plus this frame's move and asks the physics for
(target - position) / dt. At 60 fps the body lands on the target. Above 60 Havok's constraint
solve delivers only part of the move (0.86 at 120 fps, 0.78 at 170), and the next target starts
from where the body ended up, so the pull-up fell short: Link slid back on the lip, and letting go
of forward dropped him to the hang. Above a 60 fps cap, on a frame under a 60 fps one, Link's
driven body is now given last update's target plus this frame's move (at most three moves more),
so it follows the animation's path whatever share the physics delivers. The carry is dropped when
the body is not driven; at a cap of 60 nothing is carried. Both copies of the path in f_804f5030
are hooked; Link's body comes from his update (hos_oot_lift_player).

Fixes #1494

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Tested in game: Linux (CachyOS, kernel 7.3), RTX 5090, NVIDIA 620.70.06, the Forest Temple's main hall ledge by the red stairs, built as a dev pack over a base of 71b1edd8: scripted climbs at caps 60, 90, 120, 144 and uncapped (165-172 fps) rise 2.80 m with no slips (main: 2.38-2.55 m with 1-5 slips from 120 up), and letting go of forward partway up leaves Link at the top of the pull-up 4 of 4 uncapped (main: back at the hang 4 of 4). The lift reports the patch in both places, no warning.

Tested in game: Linux (CachyOS, kernel 7.3), RTX 5090, NVIDIA 620.70.06, the Forest Temple's main hall ledge by the red stairs, built as a dev pack over a base of 71b1edd8: scripted climbs at caps 60, 90, 120, 144 and uncapped (165-172 fps) rise 2.80 m with no slips (main: 2.38-2.55 m with 1-5 slips from 120 up), and letting go of forward partway up leaves Link at the top of the pull-up 4 of 4 uncapped (main: back at the hang 4 of 4). The lift reports the patch in both places, no warning.
CraftyCorvid force-pushed fix/ledge-climb-above-60 from e4ea06ea4a
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 4s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
to 46e752a7df
Some checks are pending
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 3s
2026-11-19 14:59:21 +00:00
Compare
HumanBean changed title from WIP: fix(fps): Link pulls himself up a ledge above 60 fps as at 60 to fix(fps): Link pulls himself up a ledge above 60 fps as at 60 2026-11-19 15:06:10 +00:00
HumanBean deleted branch fix/ledge-climb-above-60 2026-11-19 15:06:15 +00:00
Some checks are pending
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 3s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1740
No description provided.