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

forked from trevato/cs

Take updates from trevato/cs #388

Merged opened this in answer to

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

Merged

This merges trevato/cs `main` (0e93c82, staged at `refs/following/main`) in three commits. `bun run test` passes (typecheck plus 1601 tests), and the app boots with `/` answering 200.

shipped production is serving it deploy ae07c2d

opened this

This merges trevato/cs main (0e93c82, staged at refs/following/main) in three commits. bun run test passes (typecheck plus 1601 tests), and the app boots with / answering 200.

  1. Merge commit (5fbe0b4): every conflicted file keeps this repository's version, so its tree is byte-for-byte the same as main's.
  2. Port of upstream #233 (bots scope the AWP). This is the only upstream change the last sync (#384, up to #232) didn't have.
  3. App bundle ceiling raised. main was already over it before this pull.

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, src/server.ts, server.test.ts and src/rl/arena.test.ts.

- Upstream's text in these files is from before the engine was pulled out. - This repository already has upstream's #188–#232 in its own form (#361, #367, #371, #375, #379, #381, #384). - The conflict list is long because those syncs were squashed, so git still uses 0644e74 as the merge base. - README.md, bots.ts and bots.test.ts then get the #233 port.

  • 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 lives in src/engine/ (controls, renderer, physics) and in src/plan/, as earlier syncs decided.
  • Upstream's src/client/zoom.ts and zoom.test.ts stay out. look.ts already handles scoped sensitivity.
  • Upstream's auto-merged src/client/match.ts addition is reverted, as in #379–#384. It exists to serve upstream's settings store, which this repository doesn't have.
  • #233, ported into src/client/bots.ts:

- A new snipe step handles scoping. Past SCOPE_RANGE (500 units) a bot zooms in, and it stays zoomed until the target is inside UNSCOPE_RANGE (350), so the scope can't flip every tick. - While zoomed it moves at most SCOPED_MOVE (15%) of its stick and doesn't fire until its speed is under STEADY_SPEED (60 u/s). - Bots below SCOPE_SKILL (0.3) never scope. - snipe runs after the policy decides and only trims the Input, so the shipped weights are unaffected. - Where this differs from upstream: it applies to the learned brain only. scriptedFight doesn't scope, following this repository's rule (#381) that the arena baseline does not move. - Left out: upstream's out-of-clock branch, because this repository's fight has no such branch. Upstream's measured duel and win rates were also left out, because they were measured on upstream's code.

  • src/client/bots.test.ts:

- Upstream's tests are ported, adapted to this repository's duel setup and CS_MOVE: scope at long range, none up close, no scope on a rifle or for an easy bot, the range gap holds, and a scoped bot takes a steady shot under 0.15°. - One new test checks that the scripted baseline does not scope. - With the snipe call removed, three of them fail.

  • README.md: a paragraph on sniper bots in "The bots", after the reload rules.
  • src/games.ts and scripts/build.test.ts: the app bundle ceiling goes from 132,000 raw / 51,500 gzip to 140,500 / 54,500.

- main already failed scripts/build.test.ts: #383 (prediction) and #386 (radio) left it 1,226 raw and 178 gzipped bytes over. - This port adds another 439 raw and 161 gzipped bytes. - Following the rule in games.ts, the new ceiling is bun run scripts/build.ts's measurement (133,665 / 51,839) plus about 5%, with a note on the entry. - The test that checks the ceiling numbers was changed to match, not because it was wrong.

To try it in the preview, buy an AWP for a bot's side on Normal or Hard. A bot holding one at long range now zooms in, stops moving and waits before firing.

Closes #385

🤖 Generated with Claude Code

Closes #385

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs