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:
1 parent
5f9170b7d7
commit
c5eb6846e3
5 files changed
+44
-11
No files matched your search
+14
-5
@@ -234,7 +234,7 @@ function farB(z) {
|
||||
// Asset cache-buster — bump with main.js?v=N (see the img.src note below). EXPORTED because the
|
||||
// menu screens hang <img> tags on the same files, and two copies of this number is one copy too
|
||||
// many: the one that does not get bumped is the one that serves a cached 404.
|
||||
export const SPRV = 141;
|
||||
export const SPRV = 142;
|
||||
// The boot bar in main.js watches this. Nothing here CHANGES when things load — every sprite was
|
||||
// already requested at import — it just makes the wait visible and holds the menu back until the
|
||||
// last sheet has landed. See the onerror note below for the other half of "sometimes missing".
|
||||
@@ -1526,10 +1526,19 @@ function drawPiles(near) { // split at the net like zombies so height occludes c
|
||||
// one whose PNG has not loaded yet — falls straight through to the men's frame. That fallback is
|
||||
// deliberate: a cached 404 on one female frame degrades to a man for a frame, it does not blink the
|
||||
// body out of existence (the same rule drawZombie's missing-frame guard is built on).
|
||||
// THE TOUR THE BODY ACROSS THE NET IS PLAYING. Yours everywhere except netplay, where it is the
|
||||
// one their phone sent — a tour is which BODY you play in, and the friend picked that on their own
|
||||
// setup screen. It reaches three things and they must not disagree: the sprite suffix (SK), how the
|
||||
// art takes a colour (PS: her whites wash, his blue dyes) and the palm the idle ball bounces under
|
||||
// (BOUNCE_IDLE.oDx/oApex, which are measured per body).
|
||||
const oTour = () => (G.net && G.net.look && G.net.look.tour) || tour;
|
||||
|
||||
const SK = n => {
|
||||
// the bench's living slots pick the suffix directly (G.bench.char 'o'/'of'/'p'/'pf'), so all four
|
||||
// tennis bodies can be reviewed without touching the picked tour
|
||||
const sfx = G.bench && G.bench.char != null ? (G.bench.char.endsWith('f') ? '_f' : '') : tour.sfx;
|
||||
const sfx = G.bench && G.bench.char != null ? (G.bench.char.endsWith('f') ? '_f' : '')
|
||||
: n[0] === 'n' && n[1] === '_' ? (oTour().sfx || '') // the friend, in THEIR tour
|
||||
: tour.sfx;
|
||||
return (sfx && SPR[n + sfx]) ? n + sfx : n;
|
||||
};
|
||||
|
||||
@@ -1636,7 +1645,7 @@ function PS(name) {
|
||||
// women's it sits at the same hue as her skin and her hair, so a dark pick painted her arms, her
|
||||
// legs and her ponytail. Blue-over-white is hue-isolated by construction — see TINT in config.
|
||||
if (n[0] === 'n' && n[1] === '_' && G.net && G.net.look)
|
||||
return tinted(n, img, G.net.look.kit, G.net.look.skin, tour.kit, TINT.kit);
|
||||
return tinted(n, img, G.net.look.kit, G.net.look.skin, oTour().kit, TINT.kit);
|
||||
return img;
|
||||
}
|
||||
|
||||
@@ -2445,8 +2454,8 @@ export function render() {
|
||||
// the racket side. One `* sv.facing` fixes it for both players and both tours; it was wrong in
|
||||
// the men's world too, it just took a second body to notice.
|
||||
const mine = sv.side === 'P';
|
||||
const bx = sv.x + sv.facing * (mine ? -bounceDx() : (tour.oDx ?? BOUNCE_IDLE.oDx));
|
||||
const by = Math.abs(Math.sin(G.idleT * BOUNCE_IDLE.tempo)) * (mine ? bounceApex() : (tour.oApex ?? BOUNCE_IDLE.oApex));
|
||||
const bx = sv.x + sv.facing * (mine ? -bounceDx() : (oTour().oDx ?? BOUNCE_IDLE.oDx));
|
||||
const by = Math.abs(Math.sin(G.idleT * BOUNCE_IDLE.tempo)) * (mine ? bounceApex() : (oTour().oApex ?? BOUNCE_IDLE.oApex));
|
||||
drawBall(bx, by, sv.z);
|
||||
}
|
||||
// hot-ball ghost streak: a fast rally ball drags three fading ghosts behind it. It gated on
|
||||
|
||||
Reference in new issue
Block a user