Public: anyone can read this; the crew can change it.
forked from trevato/cs
Take updates from trevato/cs #375
Check · Review · Land · Live done — Landed and live in production.
This merges trevato/cs `main` (82a8a65, staged at `refs/following/main`) in two commits. The merge commit (`7bd3e52`) keeps this repository's tree for every conflicted file, so its tree is byte-for-byte this branch's. The one new upstream change that fits here, #228 (fall damage), is ported onto the engine layout in its own commit so it can be reviewed alone.
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
This merges trevato/cs
main(82a8a65, staged atrefs/following/main) in two commits. The merge commit (7bd3e52) keeps this repository's tree for every conflicted file, so its tree is byte-for-byte this branch's. The one new upstream change that fits here, #228 (fall damage), is ported onto the engine layout in its own commit so it can be reviewed alone.The git merge base is still #179, because earlier syncs were squashed. #367 and #371 already decided #188–#226, so only #223, #227 and #228 are new.
Per file:
src/client/{bots,hud,main,motion,report,weapons,world}.tsand their tests,src/db.tsanddb.test.ts,src/pages/game.tsandgame.test.ts, andsrc/rl/arena.test.ts. Upstream's text there is the pre-extraction version of work this repo already has, the same decision as #367 and #371.- Upstream's
report.tschange names a fall in the round's damage report. Herereport.tsis the result poster, and there is no damage report to name it in.src/client/{bodies,earshot,input,physics,plan,renderer,settings}.ts, their tests andsrc/readme.test.ts: they stay deleted. Their jobs live insrc/engine/(controls,renderer,physics) and insrc/plan/.src/client/zoom.tsandzoom.test.ts: dropped again.src/client/look.tsalready does scoped sensitivity.disabled, and a<noscript>line from the game's registry entry says why. Upstream's inline<style>inside<noscript>would also break this repo's hash-pinned style CSP.pickups, and nothing drops a weapon. The detour would have no target, so porting it would add dead code, the same reason #367 left out #222'sworthTheDetour.- Engine (
src/engine/physics.ts):movenow returns the speed a body met the floor at on the tick a fall ends, and 0 on every other tick. - This is a measurement, not a game rule, so the engine can report it. The list of exported names is unchanged, the three callers that ignore the result are untouched, and noBodyliteral changes. - Four new tests inphysics.test.ts, run on both profiles: a drop reports v²=2gh once, a jump lands at the speed it left with, walking never reports a landing, and a bounce is not a landing. -GUIDE.mdnow says whatmovereturns. - Game (src/client/world.ts):landchargesfallDamagefrommovement.ts, rounded to whole points, and armour doesn't reduce it. - Only the person gets ahurteffect, recorded at their own feet. - A death to it is a feed line with the victim on both sides and cause"fall", and no kill or money goes to anyone. -FeedEntry.weaponbecomesCause = WeaponId | "fall", shown throughcauseName. A cause string off a room's wire that this build doesn't know is shown as itself instead of crashing the frame. - HUD (src/client/hud.ts): a hurt from straight below draws the pain flash but no arc, and the feed readsPike Fall Pike. - Tests: new ones inworld.test.tsandhud.test.ts. - One existing test changed only because the feed type got wider: ingrenade.test.ts,WEAPONS[entry.weapon].namebecamecauseName(entry.weapon). The test wasn't wrong; the old line no longer type-checks. - What players will notice: nothing on the current maps. - Every level has floors at 0, 2, 64 and 128 units, plus 384-unit walls. I checkedde_forgeand 200 generated seeds. - The highest floor anyone can stand on is a 128-unit crate, which lands at about 452 u/s, under the 580 u/s where damage starts. - No replay pin moved. The README says this next to the tagging paragraph.bun run test(typecheck, thenbun test) passes 1521 of 1521. The booted app answers/with a 200 in 15 ms. In the preview, the game should play exactly as before. A fall only costs health from about 210 units up, and no floor on these maps is that high.Closes #372
🤖 Generated with Claude Code
Closes #372