Split The code is public; the app answers only to the crew.

The geometry nothing tests: `trace.ts` gets its first test, and reports the exit fraction it already computes #83

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Pushed.

Notes

shipped merged

opened this

Pushed.

src/client/trace.test.ts is new and covers rayBox on all six box faces (entry fraction and normal), the axis-parallel branch both ways (outside the slab → null, inside the slab → still finds the crossing axis), a segment that stops short, and a ray starting inside the box — pinning today's actual behaviour (t = 0, axis-0 face) rather than inventing a "correct" one. traceWorld is checked for nearest-of-several with what as the box object itself, and visible is checked false between the two bombsites (real walls between them) and true from a CT spawn cell down the open run into A site, using map.boxes, sites and spawns directly so a map edit that closes that sightline fails here first.

The one production change: rayBox now also returns tExit (where the ray leaves the box), which it already computed as tMax and discarded. No existing caller (traceWorld, combat.ts, visible) reads the new field or is otherwise touched — verified by grep and by the full suite (340 tests, all passing) — and I mutation-tested the new file by breaking the slab loop's comparisons, which reliably fails several of the new tests.

Closes #78

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs