Public: anyone can read this; the crew can change it.
forked from trevato/cs
Take updates from trevato/cs #379
Check · Review · Land · Live done — Landed and live in production.
This merges trevato/cs `main` (48b4494, staged at `refs/following/main`) in three commits. The merge commit (`954b1e2`) keeps this repository's tree for every conflicted file, so its tree is byte-for-byte this branch's. The two upstream changes #375 had not yet taken, #229 and #230, are each ported onto this repository's layout (with rendering, input and physics moved into `src/engine/`) in their…
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
This merges trevato/cs
main(48b4494, staged atrefs/following/main) in three commits. The merge commit (954b1e2) keeps this repository's tree for every conflicted file, so its tree is byte-for-byte this branch's. The two upstream changes #375 had not yet taken, #229 and #230, are each ported onto this repository's layout (with rendering, input and physics moved intosrc/engine/) in their own commit, so they can be reviewed separately.bun run test(typecheck plus 1530 tests) passes, and the app boots with/answering 200.Per file:
README.md,src/client/{bots,hud,main,motion,report,weapons,world}.tsand their tests,src/db.ts,db.test.ts,src/pages/game.ts,game.test.tsandsrc/rl/arena.test.ts. Upstream's text in these files is the version from before the engine was pulled out, and this repo already has that work in its own form. #367, #371 and #375 made the same call.README.md,main.ts,main.test.tsandpages/game.tsthen get the two ports below.src/client/{bodies,earshot,input,physics,plan,renderer,settings}.ts, their tests andsrc/readme.test.ts: they stay deleted. Their work now lives insrc/engine/(controls,renderer,physics) and insrc/plan/.src/client/zoom.tsandzoom.test.tsare dropped again, becausesrc/client/look.tsalready handles scoped sensitivity. Upstream's auto-mergedsrc/client/match.tschange is reverted: itsSIDES,MATCH_LENGTHSandRULESexist only to serve upstream's settings store, and this repo has no such store.- Engine (
src/engine/controls.ts):Controlsgets a newtouchSensitivitysetting, both as a start-up option and as a field you can change while playing. A look drag on the touch screen uses it, and the mouse never does. If it isn't set, it starts atsensitivity, so/rangeand/examplebehave as before. The list of exported names is unchanged, andGUIDE.mddocuments the setting. - Game: the menu has a Touch sens field next to Sensitivity (default 2.2), read when a match or room starts, the same way Sensitivity is. Upstream put it in the pause overlay and saved it in its settings store; this repo has neither, so it lives in the menu. CSS (@media not (pointer: coarse)) hides it on devices without a touch screen, so the menu has its final layout on the first paint. - Tests: two new engine tests and one stage test. The stage test checks that a thumb turns by 5/2.2 as much at5while the mouse stays at 0.484°; it fails if the touch path reads the mouse'ssensitivity.cs.name); now side and match length are saved next to it (cs.side,cs.length) when a match starts. On the next visit they are read back, and any stored value that isn't one of the menu's own options is ignored. A test covers saving, reading back and ignoring bad values.- Not ported: remembering the map and difficulty. This repo has no difficulty control, and the map comes from
?map=and share links.To try it in the preview: open the menu on a phone or in touch emulation and Touch sens appears (it doesn't on a desktop). Pick Terrorists and Competitive, press Play, then reload: the menu still shows both.
Closes #376
🤖 Generated with Claude Code
Closes #376