diff --git a/packages/web/src/LiveFirstPerson.svelte b/packages/web/src/LiveFirstPerson.svelte index 35b82e8..d55a910 100644 --- a/packages/web/src/LiveFirstPerson.svelte +++ b/packages/web/src/LiveFirstPerson.svelte @@ -346,27 +346,18 @@ // plays only for things done TO you, never for your own hands — // dropping a dagger must not fling your eyes out of your skull. return takeCutaway(m.position.x + 0.5, m.position.y + 0.5); - } else if (aim && !aim.self) { + } else if (aim && !aim.self && actor !== povId) { + // In the cockpit your own casts never move the camera: casting + // through the glass means you are ALREADY facing the target, and + // a keymap cast is a deliberate off-screen act. Only deeds done + // BY OTHERS earn an aim or a cutaway. const ax = aim.x + 0.5, ay = aim.y + 0.5; const wantFacing = Math.atan2(ay - ty, ax - tx); - const arc = Math.abs(shortestArc(camF, wantFacing)); - if (actor === povId) { - // Your own magic turns your head — but never wrenches it and - // NEVER cuts away: casting a door onto the wall you face must - // not fling the eyes to some other vantage. A gentle turn when - // the deed is off to the side; nothing when it is behind you - // or already in frame. - if (arc <= Math.PI * 0.55) { - targetFacing = wantFacing; - aimed = true; - } - } else { - const toAim = Math.hypot(ax - tx, ay - ty); - const sight = castRay(v, tx, ty, wantFacing); - if (sight.warped || sight.dist < toAim - 0.4) return takeCutaway(ax, ay); - targetFacing = wantFacing; - aimed = true; - } + const toAim = Math.hypot(ax - tx, ay - ty); + const sight = castRay(v, tx, ty, wantFacing); + if (sight.warped || sight.dist < toAim - 0.4) return takeCutaway(ax, ay); + targetFacing = wantFacing; + aimed = true; } else if (performance.now() >= manualUntil) { // Another wizard acting in your sight line turns your head. const other = actor !== povId ? v.players.find((p) => p.id === actor && p.alive) : null;