fix(combo): freeze foreign item models at grant time - #201
Open
Varuuna wants to merge 1 commit into
Open
Conversation
#88 made a foreign progressive draw the tier it grants instead of its static tier-1 model, which means re-resolving from live save state every frame. But the cross-grant fires mid-presentation, so the held-up model showed the right tier for one frame and then flipped to the next one: MM's Progressive Bow picked up in OOT drew a Bow, then a Large Quiver. Both foreign draw caches gain a grant-time latch that resolves the recipe once, just before the grant, and stores it non-state-dependent. Previews still track live state; the held-up model no longer moves. Mirrors the latch MM's native path already has (CUSTOM_ITEM_PARAM). A failed latch resolution writes nothing, so the draw stays live and the worst case is the old behaviour.
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.
Picking up a cross-game progressive showed the right model for one frame, then the next tier — MM's Progressive Bow found in OOT drew a Bow, then a Large Quiver.
#88 made foreign progressives draw the tier they actually grant instead of a static tier-1 model, which means resolving from live save state every frame. But the cross-grant fires mid-presentation, so the other game's save moves while the item is still held up.
Both foreign draw caches now get a grant-time latch: the recipe is resolved once, just before the grant, and stored non-state-dependent. Previews still track live state; the held-up model stops moving. Same idea as the latch MM's native path already has via
CUSTOM_ITEM_PARAM.A failed latch resolution writes nothing, so the draw stays live and the worst case is the old behaviour.
All the real logic is in
combo/menu/ComboForeignDraw{OOT,MM}.h. The vendored side is +23 lines of one-line forwarders inside existingCOMBO_BUILDguards.Playtested
item 9 10from the console while in MM flipped a shelf Hookshot to a Longshot)Known residual
The name alongside is still the static spoiler name, so the model is a Bow under "You found Progressive Bow!". Fixing that needs a cross-game resolved-name ABI, and every other
displayNameconsumer has to keep the generic name or it leaks progression. Separate issue.Build Artifacts