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

forked from trevato/cs

Take updates from trevato/cs #371

Merged opened this in answer to

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

Merged

This merges trevato/cs `main` (92c74d7, staged at `refs/following/main`) in two commits. The merge commit (`ac516a5`) keeps this repository's tree for every conflicted file. The one upstream change that is actually new, #226 (tagging), is ported onto this repo's layout in its own commit (`f0077d8`) so it can be reviewed alone.

shipped production is serving it deploy ae07c2d

opened this

This merges trevato/cs main (92c74d7, staged at refs/following/main) in two commits. The merge commit (ac516a5) keeps this repository's tree for every conflicted file. The one upstream change that is actually new, #226 (tagging), is ported onto this repo's layout in its own commit (f0077d8) so it can be reviewed alone.

The git merge base is still #179, because earlier syncs were squashed. So 25 of the 26 conflicts are upstream commits #188–#222 again, and #367 already decided those. Of the nine upstream commits, only #226 needed a decision.

Per file:

  • This side won in src/client/{hud,main,motion,weapons}.ts and their tests, src/client/world.test.ts, src/pages/game.ts and game.test.ts, src/db.ts and db.test.ts, and src/rl/arena.test.ts. Upstream's text there is the pre-extraction version of work this repo already has: #212, #214 and #217 were rebuilt on the engine in #361, #202 is this repo's #269, and #218 is standing, rebuilt in #367. Upstream's re-pinned arena episode doesn't exist in this repo's arena.test.ts.
  • This side won in src/client/{input,renderer,settings,earshot,plan,physics}.ts, their tests and src/readme.test.ts: they stay deleted.

- Input, rendering and physics live behind src/engine/ (controls.ts, renderer.ts, physics.ts), and bot planning lives in src/plan/. - Upstream's #226 edit to physics.ts only changes a comment on Wish.maxSpeed to mention tagging. It is not carried into src/engine/physics.ts: the engine shouldn't know a game rule.

  • Upstream's src/client/zoom.ts and zoom.test.ts (#198): dropped again. Scoped sensitivity already lives in src/client/look.ts (#231).
  • src/client/world.ts and src/rl/arena.ts: this side, plus #226 in the second commit.

- Each point of damage takes 1% of the victim's ground speed, never more than half, and the slow wears off at 100% of full speed a second. The constants are TAG_PER_DAMAGE, TAG_FLOOR and TAG_RECOVERY. - Only a bullet tags, not a grenade blast, and a player in the air is not tagged. It applies the same to bots and to the person. - A round start clears it, and so does the arena's equip.

  • src/client/world.test.ts: six tests ported from upstream onto this repo's helpers (alone, facingOff).

- The runner's flat floor is a copy of the level, so the shared DE_FORGE boxes are never changed.

  • src/client/replay.test.ts: re-pinned on purpose for ROUND, SMOKE_ROUND, SWITCH_ROUND, OPEN_ROUND and DUEL, with a note in the file.

- Each run matches the old pin exactly until its first hit, then differs: second 11 in the rounds, second 7 in the duel. - TIGHT_ROUND and the map digests did not move. - The shipped policy was not retrained, so the arena duel is now the old weights playing under the new rule.

  • README.md: this side, plus one paragraph on tagging next to the deploy-time rule under Playing.

bun run test (typecheck, then bun test) passes 1488 of 1488. The booted app answers / with a 200 in 9 ms. Run on their own, src/rl/arena.test.ts (an import-order ReferenceError in packed.ts) and four tests in src/client/world.test.ts (no bot policy loaded) fail, the same on main before this change; the full suite runs them all fine.

To try it in the preview: take a rifle hit while running and you should visibly stall for a moment, and the same happens to a bot you shoot.

Closes #368

🤖 Generated with Claude Code

Closes #368

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs