Split The code is public; the app answers only to the crew.
A 64-unit crate is 7 units too tall to jump onto: nothing on either map can be climbed, and crouch-jumping does nothing #234
Check · Review · Land · Live done — Landed and live in production.
A crouch-jump now lands on a 64-unit crate, and a plain jump still doesn't. When a body in the air ducks, the hull shrinks from the feet instead of the head. The head stays where it was and the feet rise the 18 units the hull gives up, so the feet clear 75 units against a plain jump's 57. `bun run check` passes (types plus 845 tests), and the app boots and `/` answers 200.
shipped merged
Sign in to join this conversation.
A crouch-jump now lands on a 64-unit crate, and a plain jump still doesn't. When a body in the air ducks, the hull shrinks from the feet instead of the head. The head stays where it was and the feet rise the 18 units the hull gives up, so the feet clear 75 units against a plain jump's 57.
bun run checkpasses (types plus 845 tests), and the app boots and/answers 200.src/client/physics.ts: the change is one named function,legLift, with a comment saying it is the legs and not the gravity. On the ground it returns 0, so ducking on a floor behaves exactly as before.MOVE.jumpVelocityand gravity are untouched, so standing jump height, fall speeds, strafe-jumping and the 128-unit tops don't change.stuckrefusal as standing up under a low ceiling. So a ducked body falling onto a floor lands ducked instead of stretching its legs through the floor.Hitboxes and rendering: nothing needed changing. The hitboxes in
combat.ts, the renderer's body squash, the HUD name plate,bodyCentreand eye height all measure up fromp.poswith the same duck blend, so they lift with the feet and still agree about where a ducked player is.Tests:
physics.test.ts:- A crouch-jump through the real
moveends withonGroundandpos[2] === 64. - The same run without duck ends on the floor, short of the crate. - Ducked and plain jumps have the same vertical speed and the same peak head height. - Ducking on the ground leaves the feet at 0. - A crouch-jump into a 72-unit slot is never inside a box on any tick, including after letting go of duck. - Standing up in the air just above a floor is refused until landing.combat.test.ts: a crouch-jumper's head hitbox matches the top of the physics hull. A shot just under that height is a headshot; a shot where a crouched head on the floor would be passes under the tucked feet.Bots: they never jump, so none of their movement changes. What did change is
findPath(map.ts): a goal on a crate cell used to get an empty path and the bot stood still. It now gets a path to the nearest floor cell beside the crate. That case becomes possible once a person can reach a crate top, for example a bomb dropped there by someone who died up there. A new test inmap.test.tschecks every crate on both maps. The README says a crate top is somewhere a bot won't follow you.Left alone:
To try it: in the preview, run at a waist-high crate, jump, then hold <kbd>Ctrl</kbd> while in the air. Do the same without <kbd>Ctrl</kbd> and you bump into its side.
🤖 Generated with Claude Code
Closes #197