Public: anyone can read this; the crew can change it.
forked from trevato/cs
Take updates from trevato/cs #361
Check · Review · Land · Live done — Landed and live in production.
This merges trevato/cs `main` (144285e, staged at `refs/following/main`). Where the two sides disagree, this repository's direction wins. Three upstream changes are rebuilt on this repo's engine because their files have drifted too far apart to merge as-is. Each is its own commit, so review them one at a time:
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
This merges trevato/cs
main(144285e, staged atrefs/following/main). Where the two sides disagree, this repository's direction wins. Three upstream changes are rebuilt on this repo's engine because their files have drifted too far apart to merge as-is. Each is its own commit, so review them one at a time:7e5298d): after a switch the gun rises in view over its deploy time, and the ammo count is dim until it can fire. The rise lives insrc/client/scene.ts, the dim ammo inhud.ts.2648395): this now happens for grenade kills too, not just bullets.world.tsrecords a grenade hit that lands, andhud.tsdraws the kill mark.f1ea1f6):- A new module,
src/client/motion.ts, holds the two values and checks the input. - The menu has a new Motion select next to Sensitivity. It starts at whatever(prefers-reduced-motion: reduce)says, and a match reads it when it starts, the same way it reads the sensitivity. - Reduced does exactly two things: the gun stops swaying as you walk (scene.ts), and the red "hit from this direction" arc holds its strength and then disappears instead of fading (hud.ts). - The recoil kick, the gun's raise, the crosshair spread, the pain flash, the tracers and the kill feed are the same on both settings. There's a test that fails if Reduced ever changes the kick or the raise. - The fake page'smatchMedia(src/engine/page.ts) now answers each media query separately, so tests can ask about reduced motion without also getting a phone.What I left out:
settings.tsand also puts it in a pause-overlay control that applies on the next frame. This repo reads its menu fields when a match starts and saves none of them, so Motion does the same here. Saving it and adding a pause-overlay copy can come later if wanted.selectedattribute. Full is simply the first option, which a browser picks by default. That keepsselectedfor the map select only, which two existing tests insrc/server.test.tsexpect. No existing test was changed.readme.test.ts. The README gets the new paragraph under Playing and amotionentry in the module list.bun run testpasses (1440 tests), and the booted app serves the Motion control on/.To try it: open the preview and walk around with Motion on Full, then on Reduced. The gun should sway only on Full. Get shot on each: on Reduced the red arc stays at full strength until it disappears. Turning on your system's reduce-motion setting makes the menu start at Reduced.
🤖 Generated with Claude Code
Closes #359