Let the Song of Time play out before the age shift - #7058
Open
bassdr wants to merge 1 commit into
Open
Conversation
bassdr
force-pushed
the
enhancement/time-travel-effect
branch
from
August 17, 2026 13:37
9e31bf5 to
a7d215e
Compare
Time Travel switched Link's age the moment the song was recognised, cutting the performance short and swapping the world with no transition at all. Wait for the song to finish, then fade to white the way the Sun's Song changes the time of day. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F6N8EuNcBrfvM35N6fMG3t
bassdr
force-pushed
the
enhancement/time-travel-effect
branch
from
August 18, 2026 22:37
a7d215e to
eb4dfc3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
With Time Travel with Song of Time enabled, playing the Song of Time away from a Time Block switched Link's age the instant the song was recognised: the performance was cut off mid-phrase and the world swapped with no transition at all (
SwitchAge()leavesTRANS_TYPE_INSTANTbehind).Now the song finishes first, and the era changes behind a white fade.
Nothing else about the enhancement moves: the same requirements gate it (Ocarina of Time and/or Master Sword, per the setting), the same nearby sources still take precedence (Time Blocks, empty warp blocks, staff spots, the Door of Time, the frogs, Gossip Stones), and Link still respawns exactly where he stood. No new CVar.
Why / how
OnOcarinaSongActionfires while the fanfare is still playing, so it now only arms the change. AnOnGameFrameUpdatepoll waits for the fanfare player to stop runningNA_BGM_OCA_TIMEbefore callingSwitchAge()- there is no sequence-finished hook to listen on, and a frame countdown would just be a magic number in its place. The poll costs one bool test per frame while nothing is pending, and the hook is only registered while the enhancement is on.The transition then borrows what the Sun's Song uses for a time-of-day change (
z_parameter.c, thesunsSongStateblock):TRANS_TYPE_FADE_WHITE_FASTout,TRANS_TYPE_FADE_WHITEin, andhaltAllActorsso the world holds still. Audio is left alone - the scene load ends the song the same way it does for the Sun's Song.The eligibility test moved into a
TimeTravelApplies()helper so the arming and the shift cannot drift apart.Testing
Build Artifacts