The tour rides the wire: your friend plays in the body they picked

A tour is which body you play in, so it belongs in the look message next to the
kit, the skin and the name. Without it both phones drew the friend in whatever
tour THIS phone had picked, and a men's/women's pairing showed each player
someone their friend was not using.

`oTour()` is the one accessor — yours everywhere, theirs in netplay — and it
feeds the three things that must agree about a body: the sprite suffix, how the
art takes a colour (her whites wash, his blue dyes) and the palm the idle ball
bounces under. An older build sends no tour and falls back to ours, which is
what it did before.

The palm knobs were re-checked against the new front sheets rather than assumed
— the poses were copied, so the ball still lands under the drawn hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
wuwiandClaude Opus 5 committed 2026-08-20 16:11:13 +02:00
1 parent 5f9170b7d7
commit c5eb6846e3
5 files changed
+44 -11

No files matched your search

+6 -2
View File
@@ -1840,13 +1840,17 @@ test('netplay: your look goes over the wire on pairing, and theirs comes back',
assert.ok(look, 'pairing announces this phone\'s look');
assert.equal(look.k, 'green'); assert.equal(look.s, 'deep');
netMsg({ t: 'look', k: 'red', s: 'pale' });
assert.equal(look.u, state.tour.id, "...and WHICH BODY it plays in — the tour is part of the look");
netMsg({ t: 'look', k: 'red', s: 'pale', u: 'women' });
assert.equal(G.net.look.kit.id, 'red', 'their kit is what the opponent is drawn in');
assert.equal(G.net.look.skin.id, 'pale');
assert.equal(G.net.look.tour.id, 'women', 'and their tour, whatever THIS phone picked');
// an older build, or a colour this one has never heard of, must not blank the opponent out
netMsg({ t: 'look', k: 'chartreuse', s: undefined });
netMsg({ t: 'look', k: 'chartreuse', s: undefined, u: 'mixed doubles' });
assert.equal(G.net.look.kit.id, cfg.KITS[0].id, 'an unknown colour falls back to as-drawn');
assert.equal(G.net.look.skin.id, cfg.SKINS[0].id);
assert.equal(G.net.look.tour.id, state.tour.id, 'and an unknown tour falls back to OUR tour');
state.selectKit(cfg.KITS[0].id); state.selectSkin(cfg.SKINS[0].id); // leave the table as found
});