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

forked from trevato/cs

Take updates from trevato/cs #393

Merged opened this in answer to

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

Merged

This merges trevato/cs `main` (979784f, staged at `refs/following/main`) in three commits. `bun run test` passes: typecheck plus 1626 tests. The app boots and `/` answers 200.

shipped production is serving it deploy ae07c2d

opened this

This merges trevato/cs main (979784f, staged at refs/following/main) in three commits. bun run test passes: typecheck plus 1626 tests. The app boots and / answers 200.

  1. Merge commit (fa90617): every conflicted file keeps this repository's version, so its tree matches main exactly. Earlier syncs were squashed, so git still merges from 0644e74 and replays upstream #188–#233. That is why 37 files conflict. This repository already has all of those in its own form (#361–#388).
  2. Port of upstream #234 (the crouch-jump).
  3. Port of upstream #236 (a round a teammate stops), plus the README for both.

Per file (merge commit):

  • This side won in README.md, src/client/{bots,hud,main,map,motion,report,weapons,world}.ts and their tests, combat.test.ts, 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 predates the engine being pulled out, and its changes up to #233 are already here.
  • 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 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 additions to src/client/match.ts and src/rl/arena.ts are dropped, as in #379–#388. This repository has no settings store for them to serve.

#234, ported into the engine:

  • src/engine/physics.ts: in move, a crouch in the air lifts the feet by exactly the height the hull gives up, and the head stays where it was. So a 57-unit jump with the legs tucked clears 75, and a 64-unit crate can be climbed. Standing back up in the air is refused while there is no room under the legs.

- It is in the engine because the direction here is that movement is the engine's. The range's body tucks its legs too. - It is written for any tuning: upstream's crate numbers appear only in src/client/movement.test.ts. - GUIDE.md has a paragraph on it.

  • Tests:

- engine/physics.test.ts runs four crouch-jump tests under both profiles, computed from each profile's own v²/2g. Two of them fail on the pre-port solver. - movement.test.ts checks the 64-unit crate: a crouch-jump lands on it, a plain jump doesn't, and a 72-unit slot never leaves the body inside the wall. - combat.test.ts gets upstream's test that the hitboxes lift with the feet.

  • Upstream's besideCrate in map.ts is not ported. pathTo in bots.ts already sends a goal on a crate to the nearest floor a bot can walk to.
  • src/rooms/wire.ts, room.ts, wire.test.ts (this side only): the port made predict.test.ts fail (0.032 u against 0.01).

- Why: the wire sends each body's crouch as a byte, which is a 255th. Now that a crouch in the air moves the feet, that rounding is up to 18/510 of a unit on the position a replay starts from. - Fix: a member's snapshot now carries its own crouch as a u16 after the ack. It follows the ack's own pattern: appended last, so a page on the previous deploy reads the same frame, and the pinned hex does not move. - Result: the worst tick is now 1.3e-4 u. The new wire test fails without the trailer. - No existing test was changed.

#236, ported into world.ts, hud.ts and main.ts:

  • A round the person fires into a teammate still does no damage. It now shows three things:

- a spark on the body, facing back along the shot; - a friendly hit mark, drawn as a plus on the axes in your side's colour and with no hit beep; - "Blocked by <name>", said once a burst: within BLOCKED_QUIET (1.5 s) the line is refreshed, not repeated.

  • A bot's blocked shot records nothing, so the arena's hot loop is unchanged.
  • In a room none of this shows. Like the hit marker, it is recorded for one screen, and the README's "not yet" line says so.
  • Tests: upstream's four world tests, adapted to this repository's level and effect ring, and one HUD test.

To try it in the preview: crouch-jump onto a crate by holding Ctrl as you jump; a plain jump bounces off. Then shoot a teammate in the back.

Closes #390

🤖 Generated with Claude Code

Closes #390

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs