Skip to content

fix(debug): the flight lets Link go for events and respawns - #2050

Merged
hckrman101 merged 2 commits into
NotRexed:mainfrom
jarynclouatre:fix/flight-yields-to-events
Nov 11, 2026
Merged

hckrman101 merged 2 commits into
NotRexed:mainfrom
jarynclouatre:fix/flight-yields-to-events

Conversation

@jarynclouatre

Copy link
Copy Markdown
Contributor

Changes

Two fixes to the Debug tab's flight, both from playing with it on.

The first: an event that takes Link (a map change, the age toggle's reload, a cutscene) waits for him to stand, and the flight moves him to its own position every tick, so he never stood. Flying into an area's exit or toggling his age in the air left the screen black until the flight was switched off. A teleport sent from the Debug tab while flying could do the same, and a second request logged "teleport waits until the current event ends". While the event manager has an event playing, the flight now lets him go, so he lands and the event goes on. When it has ended the flight takes him again from where he stands.

The second: a respawn after a fall, or a warp, keeps Link's actor, so the flight put him straight back where it had him, over the same drop. With the flight on at an owl cutscene he fell, respawned and fell again until it was switched off. When he is more than 2 units from where the flight last placed him (it moves him 4 a second), the game moved him, and the flight starts again from there.

tests/test_flight_yields_to_events.py checks both pieces of the host code.

Testing

RTX 4070 Ti SUPER, driver 621.14, Windows 11.

Build: the Windows game builds with these two commits on fc375e9 plus #2020 (the same host/hos_main.c as this branch apart from #2020's conflict, resolved by keeping both functions). test_flight_yields_to_events, test_movement_speed and test_input_background pass on Linux.

Play, on that build: flying, teleported from the Debug tab to Sacred Forest Meadow as adult. Link landed, the map loaded and the picture was normal. On the build before, the same kind of map change while flying gave a black screen until the flight was switched off, several times in one session.

Not tested in play yet: the respawn case (the owl), and flying into an exit or toggling age in the air on the fixed build.

An event that takes Link (a map change, the age toggle's reload, a
cutscene) waits for him to stand. The debug tools' flight moves him to its
own position every tick, so with it on he never stood: flying into an
area's exit, or toggling his age in the air, left the screen black until
the flight was switched off, and a second request logged "teleport waits
until the current event ends" and "age toggle undone".

While the event manager has an event playing the flight is not applied, so
Link lands and the event goes on. When it has ended the flight takes him
again from where he then stands.
A respawn after a fall, or a warp, keeps Link's actor. The flight held its
own position for that actor, so the tick after the game had put him on
safe ground it moved him straight back to where it had him, over the same
drop: he fell, respawned and fell again until the flight was switched off.

When Link is more than 2 units from where the flight last placed him (it
moves him 4 a second), the game moved him: the flight starts again from
where he is.

@hckrman101 hckrman101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read through it and it holds together. Letting flying go to 0 while oot_event_playing is true also clears flying_actor, so the flight re-seeds from where Link stands when the event ends, and the early if (!flying && action != 2 && action != 3) return; leaves him alone in between. The event test is the same events + 104 the teleport already uses, so the "waits until the current event ends" path and the new yield agree. The new test checks the order of the pieces, which is about all a game-free check can do here.

Two small things, neither blocking:

  • The respawn check compares Link's position with target. That relies on change_position having been applied to the actor by the next tick. At 4 units a second the lag is far under 2 units, but the "return to mark" action (3) while flying can jump target far away in one tick. If the actor position only updates after the physics step, the next tick would read the old position, see it more than 2 units from target, and re-seed there, which would cancel the return. I could not tell that from the source, so I would try mark then return while flying when you next have the game up.
  • The respawn and owl case, and flying into an exit, are listed as not tested yet. Worth a quick run before or right after merge.

CI: the only red check is tests/test_display_startup_failure.py (driver_cache_room undeclared, in the Vulkan code), on both the Ubuntu and Windows part 1 jobs. This PR does not touch that area, so I am not blaming it. The new test and everything else passes.

@hckrman101
hckrman101 merged commit c2a8c92 into NotRexed:main Nov 11, 2026
10 of 12 checks passed
hckrman101 pushed a commit that referenced this pull request Nov 11, 2026
…of-the-game, 1406 pipelines (#2064)

More play added to my contributed list from #2029, mostly adult areas
and dungeons I had not reached before. The data, plus one test change.

The list file was re-made with the tool from #2040:
```
python -I nx2/pipeline_states.py add jarynclouatre-most-of-the-game <my lists> --build ... --settings ... --route ...
```
It keeps only pipelines no other contributed list has. Of 8,021
pipelines in my recordings, 1,406 are new, so my file goes from 7,251 to
8,657 pipelines and the merged list from 12,800 to 14,206. The `.md`
note lists the new areas: Graveyard, Hyrule Field, Kokiri Forest, Lost
Woods, Sacred Forest Meadow, Forest Temple, Death Mountain Trail and
Crater, Goron City, Fire Temple and its boss, Zora's River, Domain and
Fountain, and the Ice Cavern, all as adult.

Recorded on Windows 11, RTX 4070 Ti SUPER (driver 621.14), no mods,
2560x1440 with dynamic resolution, on main with #1961 (some runs also
with #2020 and #2050, which change no shaders). As before it holds only
hashes, formats and draw state, no game code.

**Checked:**
- `nx2/pipeline_states.py check` passes.
- `tests/test_pipeline_states.py`, `tests/test_ship_state_list.py` and
`tests/test_pipeline_state_sources.py` pass.
- Based on main at 6cecdd1; it merges cleanly with the tour list
(#2065).

`test_split_list_lost_nothing` pinned each migrated list's exact size,
so growing a list failed it. It now takes each list's first n pipelines,
since `add` keeps a list's own pipelines first, and still checks their
count, that they don't overlap, and their hash. The same file grown by
`add` passes, and main's form of the test fails on it.

I have not timed the first start's shader preparation with this list
yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants