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

The AWP's scope zooms the view but not the mouse: 40° of view turns as fast as 90°, so a scoped flick overshoots #182

shipped merged opened this has it
opened this

Scale the look sensitivity with the zoom, so the AWP scope is the precision instrument it is supposed to be instead of the twitchiest gun in the game.

main.ts:782 draws the scoped view at fov: 40 against the hip's 90, and the mouse is untouched: controls.sensitivity is one number set from the settings field (main.ts:103, :113, :617) and read the same way whether or not view.scoped. So the same mouse movement sweeps the same number of degrees while the screen shows less than half as much of the world — a scoped turn feels more than twice as fast, and the one weapon that exists to reward a steady hand is the one you cannot hold still. CS has had a number for this since 1.6 (zoom_sensitivity_ratio); this game has none.

Done looks like

  • [ ] While scoped, the look sensitivity is scaled by the zoom, so a given mouse movement covers a comparable fraction of the screen scoped and unscoped. Write the relationship down in one place with the FOVs it is derived from — not a magic 0.45 somewhere in main.ts.
  • [ ] One setting, validated and remembered the way sensitivity already is: a zoom ratio with sane limits, defaulting to whatever makes the scope feel right (say what you chose and why). A player who wants the old behaviour can have it by setting the ratio to 1.
  • [ ] It lives beside the sensitivity field in the menu and in the pause overlay, the two kept in step exactly as the sensitivity pair already is, and it takes effect mid-match.
  • [ ] Touch aiming gets the same treatment — a drag while scoped is the same problem, and the pad is a first-class client.
  • [ ] The simulation does not change: this is the person's view only. No bot's turn rate, nothing in observe.ts, nothing in the policy's numbers.
  • [ ] Tests that fail without it: the pure function that turns a mouse delta into a yaw delta returns the scaled value when scoped and the plain one when not, at the default ratio and at 1; the setting round-trips through save and load and rejects a value outside its limits.
  • [ ] README: the AWP's line under Playing says the scope has its own sensitivity and where the number lives.

Files I expect to change: src/client/input.ts (or wherever the delta becomes a yaw — say which), src/client/settings.ts, src/client/settings.test.ts, src/client/input.test.ts, src/client/main.ts, src/pages/game.ts, README.md.

Risks: the scope's FOV and the hip's are in main.ts today and the sensitivity is in input.ts; putting the ratio in the wrong one leaves two places that both think they own the zoom. Whatever you pick, there must be exactly one derivation. main.ts is touched by pulls #156 and #159 — keep the diff there small.

Brief that fits: vesper.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs