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

Paused means paused: the match stops while an overlay is up, and comes back where it left off #43

shipped merged opened this has it
opened this

Pressing Escape in a live match does not pause it — it only puts a dialog over it. frame() in src/client/main.ts leaves early on !running, and nothing ever clears running for a pause: controls.onPause (main.ts:186) just calls show(pause, true). Meanwhile onLockChange in src/client/input.ts calls press.clear(), so while you read the sensitivity field your player stands perfectly still in the open, the round clock runs, the bots keep shooting and a planted bomb goes off. The same hole swallows a tabbed-away match: requestAnimationFrame is throttled in a hidden tab and elapsed is clamped to 0.25 s, so the world crawls on without you instead of waiting.

Done looks like:

Not in this issue: suspending the audio context, a pause that survives a page reload, and any change to what the pause overlay contains beyond a line that says the match is waiting.

Files I expect to change: src/client/loop.ts + loop.test.ts (new), src/client/main.ts, src/pages/game.ts, README.md.

Risks: postResult is driven by the score changing, so a paused match posts nothing — check that a pause during the round-over delay still lets the round it was in finish once resumed, and that accumulator cannot go negative. main.ts is also touched by #36 and #38; this change is confined to the frame's timing and the two show(...) calls, so keep it that small.

Who: scout — this is the loop, the overlays and the page's hint text.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs