Skip to content

Read Fungle's doors from the offset that describes them - #410

Merged
OhMyGuus merged 3 commits into
OhMyGuus:nightlyfrom
greluc:fungle-doors
Sep 8, 2026
Merged

OhMyGuus merged 3 commits into
OhMyGuus:nightlyfrom
greluc:fungle-doors

Conversation

@greluc

@greluc greluc commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Fungle's doors are MushroomWallDoors, a different component from every other map's, and their open flag does not sit where door_isOpen points. GameReader used door_isOpen for every map, so on Fungle it decoded an unrelated field and the doorways in ColliderMap never matched what the game was doing.

The offset that describes them, mushroomDoor_isOpen, has been published in the offsets repository since January 2024 — Fungle doors + position fix (#26) — and no client has ever read it. #365 spotted that and read the offset; this picks it up and finishes it.

What it does

  • Declares mushroomDoor_isOpen in IOffsets, optional — like nameText — because two x64 bundles, V2023.3.28.1 and V2023.7.11, predate the offset. Those fall back to door_isOpen rather than reading an undefined offset, which resolves to a NaN address, reads back as 0, and would report every doorway shut for the whole match.
  • Chooses the offset once per frame instead of once per door: map cannot change inside the loop.
  • Passes the offset as readMemory's offset argument rather than adding it into the address, so a door pointer of 0 returns the default instead of reading 0x0 + offset.

Verified

npm run lint, prettier --check and tsc --noEmit are all clean.

Other maps are untouched: for anything but Fungle the offset chosen is the same door_isOpen as before.

Not included

Door identity. closedDoors still carries the position in AllDoors rather than the value at door_doorId, which sits commented out one line below. If a map's array order differs from its doorway ids, the wrong doorway blocks audio — and that is the likelier cause of the residual wrongness reported in #365. It affects every map, so it wants verifying in game per map rather than changing blind.

Credit to @JKohlman (#365) for identifying the offset.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Download the artifacts for this pull request:


This service is provided by nightly.link. These artifacts will expire in 90 days and will not be available for download after that time.

Fungle's doors are MushroomWallDoors, a different component from every other
map's, and its open flag does not sit where door_isOpen points. The reader used
door_isOpen everywhere, so on Fungle it decoded an unrelated field and the
doorways in ColliderMap never matched what the game was doing.

The offset for it, mushroomDoor_isOpen, has been published in the offsets
repository since January 2024 (Fungle doors + position fix, OhMyGuus#26) and was never
read by this client. Jayden Kohlman diagnosed that and read the offset in OhMyGuus#365;
this builds on that work.

Declared optional because two x64 bundles, V2023.3.28.1 and V2023.7.11, predate
it; those fall back to door_isOpen rather than reading an undefined offset,
which would resolve to a NaN address and report every doorway shut for the whole
match.

The offset is now chosen once per frame instead of per door, and passed as
readMemory's offset argument rather than added into the address, so a door
pointer of zero returns the default instead of reading 0x0 + offset.

Door identity is unchanged and still wrong in the same way it was before:
closedDoors carries the position in AllDoors, not the value at door_doorId, so a
map whose array order differs from its doorway ids blocks the wrong doorway.
That needs verifying in game per map and is left alone here.

Co-Authored-By: Jayden Kohlman <2236351+JKohlman@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Lucas Greuloch (greluc) <lucas.greuloch@gmail.com>
@OhMyGuus
OhMyGuus merged commit 78b80bb into OhMyGuus:nightly Sep 8, 2026
5 checks passed
greluc added a commit to greluc/BetterCrewLink that referenced this pull request Sep 9, 2026
OhMyGuus#410 reads Fungle's doors from mushroomDoor_isOpen and falls back to door_isOpen
with ??. A bundle that could not resolve the field does not omit it though, it
publishes -1, and -1 is not nullish, so the fallback never runs and the door
state is read from offset -1.

One published bundle is in that state: x86 V2023.7.11, which serves broadcast
50585000 -- the build the Fungle arrived in. Its x64 sibling omits the field
entirely and falls back correctly, which is why this only shows on 32-bit.

The field is used now only when it actually resolved. Checked by extracting the
decision from GameReader and running it over every bundle the mirror publishes
that can load the map: sixteen of them, one reading from -1 before and none
after, with the other fifteen unchanged and non-Fungle maps still on
door_isOpen.

Fixing it here rather than in the offsets repository is deliberate. A corrected
bundle does not reach a client that has already cached the old one, and this
guard also covers any bundle that carries -1 later.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Lucas Greuloch (greluc) <lucas.greuloch@gmail.com>
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