Public: anyone can read this; the crew can change it.

forked from trevato/cs

Take updates from trevato/cs #379

Merged opened this in answer to

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

Merged

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

opened this

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 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:

  • This side won in README.md, src/client/{bots,hud,main,motion,report,weapons,world}.ts and their tests, src/db.ts, db.test.ts, src/pages/game.ts, game.test.ts and src/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.ts and pages/game.ts then get the two ports below.
  • This side won in src/client/{bodies,earshot,input,physics,plan,renderer,settings}.ts, their tests and src/readme.test.ts: they stay deleted. Their work now lives in src/engine/ (controls, renderer, physics) and in src/plan/.
  • Upstream's src/client/zoom.ts and zoom.test.ts are dropped again, because src/client/look.ts already handles scoped sensitivity. Upstream's auto-merged src/client/match.ts change is reverted: its SIDES, MATCH_LENGTHS and RULES exist only to serve upstream's settings store, and this repo has no such store.
  • #229 (touch aim has its own sensitivity): ported.

- Engine (src/engine/controls.ts): Controls gets a new touchSensitivity setting, 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 at sensitivity, so /range and /example behave as before. The list of exported names is unchanged, and GUIDE.md documents 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 at 5 while the mouse stays at 0.484°; it fails if the touch path reads the mouse's sensitivity.

  • #230 (the menu remembers your choices): partly ported. This repo already remembered the name (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

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs