Skip to content

fix(combo): freeze foreign item models at grant time - #201

Open
Varuuna wants to merge 1 commit into
developfrom
fix/foreign-progressive-draw-latch
Open

fix(combo): freeze foreign item models at grant time#201
Varuuna wants to merge 1 commit into
developfrom
fix/foreign-progressive-draw-latch

Conversation

@Varuuna

@Varuuna Varuuna commented Sep 7, 2026

Copy link
Copy Markdown
Owner

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 existing COMBO_BUILD guards.

Playtested

  • MM Progressive Bow and Progressive Sword picked up in OOT — correct model, stable
  • OOT progressives picked up in MM
  • MM foreign shop shelf
  • Live preview still updates without pickup (item 9 10 from 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 displayName consumer has to keep the generic name or it leaks progression. Separate issue.

Build Artifacts

#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.
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.

1 participant