Split The code is public; the app answers only to the crew.

The gun is up on screen a second before it can fire: the raise is a fixed 0.24 s, the AWP's deploy is 1.25 s #214

Merged opened this

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

Merged

The viewmodel's raise now runs on the weapon's own `deployTime` instead of a fixed 0.24 s, read off the shot clock the simulation already keeps: the seconds still owed to `nextShotAt` are the seconds of raise left, so the gun is level on the frame the trigger frees — 1.25 s for the AWP, half a second for a pistol — and a gun drawn mid-cooldown waits down there and rises to meet it. No second clock…

shipped merged

opened this

The viewmodel's raise now runs on the weapon's own deployTime instead of a fixed 0.24 s, read off the shot clock the simulation already keeps: the seconds still owed to nextShotAt are the seconds of raise left, so the gun is level on the frame the trigger frees — 1.25 s for the AWP, half a second for a pistol — and a gun drawn mid-cooldown waits down there and rises to meet it. No second clock is started, so a paused match still does not animate and a switch the renderer never drew a frame of still raises.

deploying in src/client/world.ts is the one new question: it separates a gun arriving from a gun working, since shoot and throwGrenade stamp lastShotAt at the moment they push nextShotAt and deploy never touches it. The HUD uses it to dim the ammo counter and the weapon's name while the trigger will not answer, and the dim lifts on the same frame the gun comes level. A weapon that owes no draw at all — the grenade — still gets MIN_RAISE (0.12 s, named in renderer.ts with its reason) from the frame the hands were given it, and that floor tolerates a frame that ran two ticks. A round start hands the guns out by assignment with the shot clock zeroed, which owes nothing and raises nothing, so the freeze begins level as before; a gun bought during the freeze arrives the same way, with no raise, which is the one thing that used to animate and no longer does.

To look at: renderer.ts:780 for the raise, world.ts:728 for the predicate, and in the preview switch knife → AWP and watch the gun rise for the whole 1.25 s with the ammo dim, then compare a pistol. bun run check is green (771 tests); the two headline tests were confirmed to fail against the old fixed raise and the undimmed HUD. deployTime's numbers are untouched, and nothing here adds a draw call, so #196 is unaffected.

🤖 Generated with Claude Code

Closes #208

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs