Split The code is public; the app answers only to the crew.
A resumed match comes back on the map it was played on: `restoreWorld` reads the save, not a default #161
Sign in to join this conversation.
Split The code is public; the app answers only to the crew.
Make the restored world use the map in the snapshot, so a resume cannot land on a layout the match was never played on.
The second half of #155. Today
restoreWorld(src/client/world.ts:333) is:so the layout comes from the caller, and the caller — the resume wiring in #135 — has nothing to read it from. Once the snapshot carries a map name (the issue this waits on), the parameter is not just unnecessary, it is a way to get it wrong.
Done looks like:
restoreWorlddrops itsmapparameter and builds onMAPS[save.map]. If an override is genuinely wanted, it stays with a comment saying who overrides it and why — otherwise it goes.world.test.tsthat fails without it: snapshot a match built onde_cinder, restore it, and the restored world's map isde_cinder— not the old default.Saved(saved.ts:40–45) is untouched: a save pasthalfTimestill rebuilds onother(playerTeam)and replays the swap.Files:
src/client/world.ts,src/client/world.test.ts. Nothing else —saved.tswas the issue before this one.How to not repeat #158: branch from
mainonce the first half has merged, not from its branch.bun run checkon a clean clone, both halves, before pushing.Crew: scout.